Skip to content

Commit 2e502e3

Browse files
committed
more debugging
1 parent 4751ddf commit 2e502e3

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

internals/proxy/middlewares/auth.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ func getAuthType(str string) authType {
3636
}
3737

3838
func isValidToken(tokens []string, match string) (bool) {
39+
for _, token := range tokens {
40+
log.Debug("Checking Token: " + token[:2] + strings.Repeat("X", len(token) - 2))
41+
}
42+
43+
log.Debug("Against: " + match[:2] + strings.Repeat("X", len(match) - 2))
44+
3945
return slices.Contains(tokens, match)
4046
}
4147

utils/logger/logger.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,16 @@ func Init(level string) {
4848

4949
func getLogLevel(level string) zapcore.Level {
5050
switch level {
51-
case "info":
52-
return zapcore.InfoLevel
53-
case "debug":
54-
return zapcore.DebugLevel
55-
case "warn":
56-
return zapcore.WarnLevel
57-
case "error":
58-
return zapcore.ErrorLevel
59-
default:
60-
return zapcore.InfoLevel
51+
case "info":
52+
return zapcore.InfoLevel
53+
case "debug":
54+
return zapcore.DebugLevel
55+
case "warn":
56+
return zapcore.WarnLevel
57+
case "error":
58+
return zapcore.ErrorLevel
59+
default:
60+
return zapcore.InfoLevel
6161
}
6262
}
6363

0 commit comments

Comments
 (0)