mirror of
https://codeberg.org/VnPower/PixivFE
synced 2024-12-06 19:16:23 +01:00
default Cache-Control to no-cache
This commit is contained in:
@@ -25,6 +25,9 @@ func RenderWithContentType[T any](w http.ResponseWriter, r *http.Request, conten
|
||||
// Set strong ETag
|
||||
w.Header().Set("ETag", `"`+etag+`"`)
|
||||
|
||||
// As a default, set Cache-Control to no-cache, which allows revalidation via ETag
|
||||
w.Header().Set("Cache-Control", "no-cache")
|
||||
|
||||
w.WriteHeader(request_context.Get(r).RenderStatusCode)
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user