diff options
Diffstat (limited to 'server/src/main.rs')
-rw-r--r-- | server/src/main.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index a1a8502..f6608fc 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -97,7 +97,17 @@ async fn run() { .or(sw_script) .or(old_format_redirect) .or(client_config_css) - .map(|r| warp::reply::with_header(r, "cache-control", "max-age=86400"))) + .map(|r| { + warp::reply::with_header( + r, + "cache-control", + if cfg!(debug_assertions) { + "no-cache" + } else { + "max-age=86400" + }, + ) + })) .recover(handle_rejection) .with(warp::log("keks-meet")) .map(|r| warp::reply::with_header(r, "server", "keks-meet")); |