Disable debug routes unless PPROF is enabled in configuration (#4995)

This commit is contained in:
Lauris BH 2018-09-30 01:44:06 +03:00 committed by techknowlogick
parent fc0001caa1
commit ab5b245182
3 changed files with 19 additions and 14 deletions

View file

@ -131,6 +131,7 @@ func NewMacaron() *macaron.Macaron {
Func: models.Ping,
},
},
DisableDebug: !setting.EnablePprof,
}))
m.Use(context.Contexter())
return m