Skip to content

Commit

Permalink
feat(3.3.0): add cache-control header
Browse files Browse the repository at this point in the history
  • Loading branch information
auguwu committed Mar 9, 2022
1 parent 87105b6 commit 87fd749
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ dockers:
- auguwu/ume:latest-amd64
- auguwu/ume:{{ .Version }}-amd64
- auguwu/ume:{{ .Major }}.{{ .Minor }}-amd64
- ghcr.io/auguwu/ume:latest
- ghcr.io/auguwu/ume:latest-amd64
- ghcr.io/auguwu/ume:{{ .Version }}-amd64
- ghcr.io/auguwu/ume:{{ .Major }}.{{ .Minor }}-amd64
Expand Down
2 changes: 2 additions & 0 deletions routing/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ func NewImagesRouter(client *mongo.Client) chi.Router {
}

contentType, _ := types[s[len(s)-1]]

w.Header().Set("Content-Type", contentType)
w.Header().Set("Cache-Control", "public, max-age=777600, must-revalidate")
w.WriteHeader(200)
})

Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "3.2.4"
"version": "3.3.0"
}

0 comments on commit 87fd749

Please sign in to comment.