From 87fd7494c4895cfeeb66a6afcfe085fa45f5a42d Mon Sep 17 00:00:00 2001 From: Noel Date: Tue, 8 Mar 2022 19:46:20 -0700 Subject: [PATCH] feat(3.3.0): add `cache-control` header --- .goreleaser.yml | 1 - routing/images.go | 2 ++ version.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 5c08573..11b6621 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -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 diff --git a/routing/images.go b/routing/images.go index 585afaf..3a9e75d 100644 --- a/routing/images.go +++ b/routing/images.go @@ -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) }) diff --git a/version.json b/version.json index 698234a..8b25297 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "3.2.4" + "version": "3.3.0" }