diff --git a/internal/handler/site/site_handler.go b/internal/handler/site/site_handler.go index 3a67dd5..04e64ed 100644 --- a/internal/handler/site/site_handler.go +++ b/internal/handler/site/site_handler.go @@ -49,6 +49,7 @@ func (h *SiteHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { } h.next.ServeHTTP(w, r) + w.Header().Set("Cache-Control", "public, max-age=31536000, no-cache") case http.MethodOptions: w.Header().Set("Allow", options) @@ -71,6 +72,7 @@ func (h *SiteHandler) serveFile(w http.ResponseWriter, r *http.Request) { if info.ContentType != "" { w.Header().Set("Content-Type", info.ContentType) } + w.Header().Set("Cache-Control", "public, max-age=31536000, no-cache") if info.Hash != "" { w.Header().Set("ETag", fmt.Sprintf(`"%s"`, info.Hash)) } diff --git a/pageship b/pageship new file mode 100755 index 0000000..212d7d4 Binary files /dev/null and b/pageship differ