Skip to content

Commit c17750e

Browse files
committed
Change Cache-Control default max-age to one minute
The extremely long cache expiration doesn't match usage. Also clean up a minor clippy lint. Signed-off-by: Lann Martin <[email protected]>
1 parent 3be1550 commit c17750e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use std::{
1313
};
1414

1515
/// The default value for the cache control header.
16-
const CACHE_CONTROL_DEFAULT_VALUE: &str = "max-age=31536000";
16+
const CACHE_CONTROL_DEFAULT_VALUE: &str = "max-age=60";
1717
/// Environment variable for the cache configuration.
1818
const CACHE_CONTROL_ENV: &str = "CACHE_CONTROL";
1919
/// Brotli compression level 1-11.
@@ -27,7 +27,7 @@ const BROTLI_ENCODING: &str = "br";
2727
const PATH_INFO_HEADER: &str = "spin-path-info";
2828

2929
/// Common Content Encodings
30-
#[derive(PartialEq, Eq, Debug)]
30+
#[derive(Debug, Eq, PartialEq)]
3131
pub enum ContentEncoding {
3232
Brotli,
3333
//Deflate, // Could use flate2 for this

0 commit comments

Comments
 (0)