feat(deps): update golangci-lint to v2
This commit was merged in pull request #55.
This commit is contained in:
@@ -7,14 +7,10 @@ import (
|
||||
|
||||
func CacheControl(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
path := r.URL.Path
|
||||
|
||||
cached := false
|
||||
if strings.HasPrefix(path, "/static") {
|
||||
cached = true
|
||||
}
|
||||
shouldCache := strings.HasPrefix(r.URL.Path, "/static")
|
||||
|
||||
if !cached {
|
||||
if !shouldCache {
|
||||
w.Header().Set("Cache-Control", "no-cache, no-store, must-revalidate")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user