summaryrefslogtreecommitdiff
path: root/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'web.go')
-rw-r--r--web.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/web.go b/web.go
index 508cab3..c3fe0b7 100644
--- a/web.go
+++ b/web.go
@@ -27,10 +27,13 @@ func webSetup() {
}
router = gin.New()
- router.Use(recovery())
router.ForwardedByClientIP = config.Server.Proxy
+ router.TrustedProxies = config.Server.TrustedProxies
if config.System.Verbose {
router.Use(gin.Logger())
+ router.Use(gin.Recovery())
+ } else {
+ router.Use(recovery())
}
router.NoRoute(func(context *gin.Context) {
context.Redirect(http.StatusTemporaryRedirect, "/web")