summaryrefslogtreecommitdiffstats
path: root/modules/context
diff options
context:
space:
mode:
authorPiotr Orzechowski <piotr@orzechowski.tech>2018-02-14 05:46:00 +0100
committerLauris BH <lauris@nix.lv>2018-02-14 06:46:00 +0200
commitb104ab3ca1690f35d0674d3807681390e640e5c8 (patch)
treedcc2018a27fbc6e6455abafe632660c2a6289137 /modules/context
parent4c9d9c221a0628753f3dc16b469330ee096cbf18 (diff)
downloadgitea-b104ab3ca1690f35d0674d3807681390e640e5c8.tar.gz
gitea-b104ab3ca1690f35d0674d3807681390e640e5c8.zip
Add option to enable or disable swagger endpoints (#3502)
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 311186e644..ea26184397 100644
--- a/modules/context/context.go
+++ b/modules/context/context.go
@@ -243,6 +243,7 @@ func Contexter() macaron.Handler {
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding
ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion
+ ctx.Data["EnableSwaggerEndpoint"] = setting.API.EnableSwaggerEndpoint
ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn
c.Map(ctx)