aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/internal.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/private/internal.go')
-rw-r--r--routers/private/internal.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/private/internal.go b/routers/private/internal.go
index cfbad19678..dafcd88822 100644
--- a/routers/private/internal.go
+++ b/routers/private/internal.go
@@ -9,6 +9,7 @@ import (
"strings"
"code.gitea.io/gitea/models"
+ "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"gitea.com/macaron/macaron"
@@ -19,6 +20,7 @@ func CheckInternalToken(ctx *macaron.Context) {
tokens := ctx.Req.Header.Get("Authorization")
fields := strings.Fields(tokens)
if len(fields) != 2 || fields[0] != "Bearer" || fields[1] != setting.InternalToken {
+ log.Debug("Forbidden attempt to access internal url: Authorization header: %s", tokens)
ctx.Error(403)
}
}