Skip to content

Commit 311cafd

Browse files
committed
Updated README cache-header
Now no longer lasts for a year and removes immutability
1 parent 6a0d5f1 commit 311cafd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/uploaders.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use crate::middleware::app::RequestApp;
1515
use crate::models::Crate;
1616

1717
pub const CACHE_CONTROL_IMMUTABLE: &str = "public,max-age=31536000,immutable";
18+
pub const CACHE_CONTROL_README: &str = "public,max-age=604800";
1819

1920
#[derive(Clone, Debug)]
2021
pub enum Uploader {
@@ -138,10 +139,7 @@ impl Uploader {
138139
let content_length = body.len() as u64;
139140
let content = Cursor::new(body);
140141
let mut extra_headers = header::HeaderMap::new();
141-
extra_headers.insert(
142-
header::CACHE_CONTROL,
143-
CACHE_CONTROL_IMMUTABLE.parse().unwrap(),
144-
);
142+
extra_headers.insert(header::CACHE_CONTROL, CACHE_CONTROL_README.parse().unwrap());
145143
self.upload(
146144
app.http_client(),
147145
&path,

0 commit comments

Comments
 (0)