11 lines
253 B
Go
11 lines
253 B
Go
|
package webui
|
||
|
|
||
|
import "net/http"
|
||
|
|
||
|
func cache(next http.Handler) http.Handler {
|
||
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||
|
w.Header().Set("Cache-Control", "public, max-age=31536000, immutable")
|
||
|
next.ServeHTTP(w, r)
|
||
|
})
|
||
|
}
|