Skip to content

Commit

Permalink
cache header
Browse files Browse the repository at this point in the history
  • Loading branch information
gempir committed Feb 18, 2024
1 parent ba513a6 commit 999237f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/server/asset.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ func (a *Api) AssetHandler(w http.ResponseWriter, r *http.Request) {

w.Header().Set("Content-Type", asset.MimeType)
w.Header().Set("Content-Length", fmt.Sprintf("%d", len(asset.Blob)))
w.Header().Set("Cache-Control", "public, max-age=31536000")
w.WriteHeader(http.StatusOK)
_, _ = w.Write(asset.Blob)
}

0 comments on commit 999237f

Please sign in to comment.