🐛 bug: fix Cache-Control header so Nginx can cache my blog
parent
e5d157e1af
commit
6ea8b5c30f
|
@ -202,7 +202,7 @@ async fn serve_file (
|
||||||
// slashdotting for us, but not so much that a low-traffic site would
|
// slashdotting for us, but not so much that a low-traffic site would
|
||||||
// suffer from seeing stale data.
|
// suffer from seeing stale data.
|
||||||
|
|
||||||
response.header ("cache-control".to_string (), b"no-cache,max-age=5".to_vec ());
|
response.header ("cache-control".to_string (), b"max-age=2".to_vec ());
|
||||||
if let Some (etag) = input.actual_etag {
|
if let Some (etag) = input.actual_etag {
|
||||||
response.header ("etag".to_string (), etag);
|
response.header ("etag".to_string (), etag);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue