diff options
author | Colin Reeder <colin@vpzom.click> | 2020-09-30 19:57:06 -0600 |
---|---|---|
committer | Colin Reeder <colin@vpzom.click> | 2020-09-30 19:57:06 -0600 |
commit | 1c2477ed05dde6e54fd445fef82a642f39a159e7 (patch) | |
tree | b54171255ac193ba17f141a4e78fe4a3a8576bcc /src/routes/static.rs | |
parent | 0fcebe50e91ea17846b97f64540dc190c4bda3a8 (diff) |
Hashing and caching for icons (#100)
Diffstat (limited to 'src/routes/static.rs')
-rw-r--r-- | src/routes/static.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/routes/static.rs b/src/routes/static.rs index d319efe..766a094 100644 --- a/src/routes/static.rs +++ b/src/routes/static.rs @@ -27,6 +27,10 @@ async fn handler_static_get( hyper::header::CONTENT_TYPE, hyper::header::HeaderValue::from_static("image/svg+xml"), ); + resp.headers_mut().insert( + hyper::header::CACHE_CONTROL, + hyper::header::HeaderValue::from_static("max-age=31536000, immutable"), + ); Ok(resp) } else { |