diff options
Diffstat (limited to 'pkg/app/serve.go')
-rw-r--r-- | pkg/app/serve.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/app/serve.go b/pkg/app/serve.go index a263781..4f97039 100644 --- a/pkg/app/serve.go +++ b/pkg/app/serve.go @@ -17,6 +17,7 @@ import ( "soko/pkg/app/handler/useflags" "soko/pkg/config" "soko/pkg/database" + "time" ) // Serve is used to serve the web application @@ -137,6 +138,7 @@ func mw(handler http.HandlerFunc) http.HandlerFunc { // setDefaultHeaders sets the default headers that apply for all pages func setDefaultHeaders(w http.ResponseWriter) { w.Header().Set("Cache-Control", config.CacheControl()) + w.Header().Set("Expires", time.Now().UTC().Add(config.CacheTime).Format(http.TimeFormat)) } func cors(h http.Handler) http.HandlerFunc { |