Skip to content

Commit

Permalink
Remove unused content_response match statement (ordinals#2384)
Browse files Browse the repository at this point in the history
  • Loading branch information
casey authored Aug 29, 2023
1 parent a5348a0 commit 2b27ea7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -905,18 +905,12 @@ impl Server {
header::CONTENT_SECURITY_POLICY,
HeaderValue::from_static("default-src *:*/content/ *:*/blockheight *:*/blockhash *:*/blockhash/ *:*/blocktime 'unsafe-eval' 'unsafe-inline' data: blob:"),
);

let body = inscription.into_body();
let cache_control = match body {
Some(_) => "max-age=31536000, immutable",
None => "max-age=600",
};
headers.insert(
header::CACHE_CONTROL,
HeaderValue::from_str(cache_control).unwrap(),
HeaderValue::from_static("max-age=31536000, immutable"),
);

Some((headers, body?))
Some((headers, inscription.into_body()?))
}

async fn preview(
Expand Down

0 comments on commit 2b27ea7

Please sign in to comment.