From 041c8e695ec9246d6bb5436aa6e334c4ecda9ede Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 13 Feb 2023 12:58:22 +0100 Subject: [chore] Do cache-control in a less silly way to avoid writing header twice (#1481) * do cache-control in a less silly way to avoid writing header twice * add comment back in --- internal/api/fileserver/servefile.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'internal/api/fileserver/servefile.go') diff --git a/internal/api/fileserver/servefile.go b/internal/api/fileserver/servefile.go index 6b125debc..df3c83fe7 100644 --- a/internal/api/fileserver/servefile.go +++ b/internal/api/fileserver/servefile.go @@ -88,12 +88,7 @@ func (m *Module) ServeFile(c *gin.Context) { } if content.URL != nil { - // This is a non-local S3 file we're redirecting to. - // Rewrite the cache control header to reflect the - // TTL of the generated signed link, instead of the - // default very long cache. - const cacheControl = "private,max-age=86400" // 24h - c.Header("Cache-Control", cacheControl) + // This is a non-local, non-proxied S3 file we're redirecting to. c.Redirect(http.StatusFound, content.URL.String()) return } -- cgit v1.2.3