mirror of
https://github.com/coalaura/whiskr.git
synced 2025-12-02 20:22:52 +00:00
json & web search
This commit is contained in:
2
main.go
2
main.go
@@ -42,7 +42,7 @@ func cache(next http.Handler) http.Handler {
|
||||
path := strings.ToLower(r.URL.Path)
|
||||
ext := filepath.Ext(path)
|
||||
|
||||
if ext == ".svg" || ext == ".ttf" || strings.HasSuffix(path, ".min.js") {
|
||||
if ext == ".svg" || ext == ".ttf" || strings.HasSuffix(path, ".min.js") || strings.HasSuffix(path, ".min.css") {
|
||||
w.Header().Set("Cache-Control", "public, max-age=3024000, immutable")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user