summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-08-13 18:18:18 +0100
committerGitHub <noreply@github.com>2020-08-13 18:18:18 +0100
commit2ef318e6f1d0c674e894d2d1f25ca79498663466 (patch)
tree4914d7c95e814af2ffdc8ea7101b6f1b86e03ae4 /modules/context
parente266ba30cca17bdb5c50fd0cd30d2e429e58ac26 (diff)
downloadgitea-2ef318e6f1d0c674e894d2d1f25ca79498663466.tar.gz
gitea-2ef318e6f1d0c674e894d2d1f25ca79498663466.zip
Add Access-Control-Expose-Headers (#12446)
Fix #12424 Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: silverwind <me@silverwind.io>
Diffstat (limited to 'modules/context')
-rw-r--r--modules/context/context.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/context/context.go b/modules/context/context.go
index b26528f6b2..cc68fb093b 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -222,6 +222,7 @@ func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interfa
ctx.Resp.Header().Set("Expires", "0")
ctx.Resp.Header().Set("Cache-Control", "must-revalidate")
ctx.Resp.Header().Set("Pragma", "public")
+ ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition")
http.ServeContent(ctx.Resp, ctx.Req.Request, name, modtime, r)
}