mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-23 17:53:23 +02:00
commit
aabc5ec326
@ -22,6 +22,9 @@ func SetHeaders(c *web.C, h http.Handler) http.Handler {
|
|||||||
w.Header().Add("Cache-Control", "value")
|
w.Header().Add("Cache-Control", "value")
|
||||||
w.Header().Set("Last-Modified", time.Now().UTC().Format(http.TimeFormat))
|
w.Header().Set("Last-Modified", time.Now().UTC().Format(http.TimeFormat))
|
||||||
w.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
|
w.Header().Set("Expires", "Thu, 01 Jan 1970 00:00:00 GMT")
|
||||||
|
if r.TLS != nil {
|
||||||
|
w.Header().Add("Strict-Transport-Security", "max-age=31536000")
|
||||||
|
}
|
||||||
h.ServeHTTP(w, r)
|
h.ServeHTTP(w, r)
|
||||||
}
|
}
|
||||||
return http.HandlerFunc(fn)
|
return http.HandlerFunc(fn)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user