diff options
Diffstat (limited to 'routers/routes/macaron.go')
-rw-r--r-- | routers/routes/macaron.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/routes/macaron.go b/routers/routes/macaron.go index 1f0b21a74d..170bc7d493 100644 --- a/routers/routes/macaron.go +++ b/routers/routes/macaron.go @@ -6,10 +6,12 @@ package routes import ( "encoding/gob" + "net/http" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/httpcache" "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/options" @@ -977,6 +979,8 @@ func RegisterMacaronRoutes(m *macaron.Macaron) { // Progressive Web App m.Get("/manifest.json", templates.JSONRenderer(), func(ctx *context.Context) { + ctx.Resp.Header().Set("Cache-Control", httpcache.GetCacheControl()) + ctx.Resp.Header().Set("Last-Modified", setting.AppStartTime.Format(http.TimeFormat)) ctx.HTML(200, "pwa/manifest_json") }) |