Remove cache-control header from pages
This commit is contained in:
parent
8bcf7f045d
commit
0a7b62f1cb
1 changed files with 2 additions and 12 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue