diff options
author | 2023-02-13 12:58:22 +0100 | |
---|---|---|
committer | 2023-02-13 12:58:22 +0100 | |
commit | 041c8e695ec9246d6bb5436aa6e334c4ecda9ede (patch) | |
tree | d951e1756288fedc639c08357946ca8699b2795a /internal/api/fileserver/servefile.go | |
parent | [docs] Update user/admin settings docs (#1491) (diff) | |
download | gotosocial-041c8e695ec9246d6bb5436aa6e334c4ecda9ede.tar.xz |
[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
Diffstat (limited to 'internal/api/fileserver/servefile.go')
-rw-r--r-- | internal/api/fileserver/servefile.go | 7 |
1 files changed, 1 insertions, 6 deletions
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 } |