mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-19 03:26:57 +00:00
cache pages (#403)
taken from https://codeberg.org/Codeberg/pages-server/pulls/301 Co-authored-by: Moritz Marquardt <git@momar.de> Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/403 Co-authored-by: crapStone <me@crapstone.dev> Co-committed-by: crapStone <me@crapstone.dev>
This commit is contained in:
parent
23a8e83e80
commit
85059aa46e
4 changed files with 120 additions and 117 deletions
|
@ -24,8 +24,5 @@ func (o *Options) setHeader(ctx *context.Context, header http.Header) {
|
|||
} else {
|
||||
ctx.RespWriter.Header().Set(gitea.ContentTypeHeader, mime)
|
||||
}
|
||||
if encoding := header.Get(gitea.ContentEncodingHeader); encoding != "" && encoding != "identity" {
|
||||
ctx.RespWriter.Header().Set(gitea.ContentEncodingHeader, encoding)
|
||||
}
|
||||
ctx.RespWriter.Header().Set(headerLastModified, o.BranchTimestamp.In(time.UTC).Format(http.TimeFormat))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue