diff options
author | metamuffin <metamuffin@disroot.org> | 2023-09-24 11:10:11 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-09-24 11:10:11 +0200 |
commit | 0c1059307a79f56615a61f26c26de9ffb85c1822 (patch) | |
tree | 863f11349ea4a9eacdba897a81cbf28d40dd22f1 /server/src | |
parent | c1aa8ab4e7abfc5abbcf8c7887fc241f61932536 (diff) | |
download | keks-meet-0c1059307a79f56615a61f26c26de9ffb85c1822.tar keks-meet-0c1059307a79f56615a61f26c26de9ffb85c1822.tar.bz2 keks-meet-0c1059307a79f56615a61f26c26de9ffb85c1822.tar.zst |
set cache-control and server headers
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/main.rs | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index 4345d6b..a1a8502 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -86,19 +86,21 @@ async fn run() { }); let version: _ = warp::path!("version").map(|| env!("CARGO_PKG_VERSION")); - let routes: _ = assets - .or(room) - .or(index) - .or(signaling) - .or(client_config) - .or(version) - .or(css) - .or(favicon) - .or(sw_script) - .or(old_format_redirect) - .or(client_config_css) + let routes: _ = signaling + .or(assets + .or(room) + .or(index) + .or(client_config) + .or(version) + .or(css) + .or(favicon) + .or(sw_script) + .or(old_format_redirect) + .or(client_config_css) + .map(|r| warp::reply::with_header(r, "cache-control", "max-age=86400"))) .recover(handle_rejection) - .with(warp::log("stuff")); + .with(warp::log("keks-meet")) + .map(|r| warp::reply::with_header(r, "server", "keks-meet")); // if listender fd is passed from the outside world, use it. let mut listenfd = ListenFd::from_env(); |