mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-07 20:59:29 +02:00
Fix wrong last modify time (#32102)
This commit is contained in:
1 parent
5de41737a5
commit
a802508f88
4 files changed
+8
-3
No files matched your search
@@ -79,6 +79,7 @@ func ServeSetHeaders(w http.ResponseWriter, opts *ServeHeaderOptions) {
|
||||
httpcache.SetCacheControlInHeader(header, duration)
|
||||
|
||||
if !opts.LastModified.IsZero() {
|
||||
// http.TimeFormat required a UTC time, refer to https://pkg.go.dev/net/http#TimeFormat
|
||||
header.Set("Last-Modified", opts.LastModified.UTC().Format(http.TimeFormat))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user