diff options
Diffstat (limited to 'modules/context/context.go')
-rw-r--r-- | modules/context/context.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/context/context.go b/modules/context/context.go index ac46bb38..228ed3d8 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -156,6 +156,11 @@ func Contexter() macaron.Handler { }, Org: &Organization{}, } + + if len(setting.HTTP.AccessControlAllowOrigin) > 0 { + ctx.Header().Set("Access-Control-Allow-Origin", setting.HTTP.AccessControlAllowOrigin) + } + // Compute current URL for real-time change language. ctx.Data["Link"] = setting.AppSubUrl + strings.TrimSuffix(ctx.Req.URL.Path, "/") |