1
0
Fork 0

Remove cache-control header from pages

This commit is contained in:
Adrian Hedqvist 2025-04-02 23:29:35 +02:00
parent 8bcf7f045d
commit 0a7b62f1cb
Signed by: tollyx
SSH key fingerprint: SHA256:NqZilNUilqR38F1LQMrz2E65ZsA621eT3lO+FqHS48Y

View file

@ -71,24 +71,14 @@ async fn view(
}
if method == http::method::Method::HEAD {
return Ok((
StatusCode::OK,
[
(header::ETAG, post.etag.as_str()),
(header::CACHE_CONTROL, "no-cache"),
],
)
.into_response());
return Ok((StatusCode::OK, [(header::ETAG, post.etag.as_str())]).into_response());
}
let res = render_page(&state, post).await?;
Ok((
StatusCode::OK,
[
(header::ETAG, post.etag.as_str()),
(header::CACHE_CONTROL, "no-cache"),
],
[(header::ETAG, post.etag.as_str())],
Html(res),
)
.into_response())