debian-mirror-gitlab/workhorse/internal/staticpages/static.go

15 lines
324 B
Go
Raw Normal View History

2021-02-22 17:27:13 +05:30
package staticpages
2023-03-04 22:38:38 +05:30
import "net/http"
2021-02-22 17:27:13 +05:30
type Static struct {
DocumentRoot string
2021-03-05 16:19:46 +05:30
Exclude []string
2021-02-22 17:27:13 +05:30
}
2023-03-04 22:38:38 +05:30
func setNoCacheHeaders(header http.Header) {
header.Set("Cache-Control", "no-cache, no-store, max-age=0, must-revalidate")
header.Set("Pragma", "no-cache")
header.Set("Expires", "Fri, 01 Jan 1990 00:00:00 GMT")
}