test logs
This commit is contained in:
parent
6002b594c6
commit
c171efcfe0
|
|
@ -18,6 +18,11 @@ func (a *App) authMiddleware(c *fiber.Ctx) error {
|
||||||
c.Locals("ip_address", ip)
|
c.Locals("ip_address", ip)
|
||||||
c.Locals("user_agent", userAgent)
|
c.Locals("user_agent", userAgent)
|
||||||
authHeader := c.Get("Authorization")
|
authHeader := c.Get("Authorization")
|
||||||
|
fmt.Println("--------------------------------")
|
||||||
|
fmt.Println("userAgent", userAgent)
|
||||||
|
fmt.Println("ip", ip)
|
||||||
|
fmt.Println("authHeader", authHeader)
|
||||||
|
fmt.Println("--------------------------------")
|
||||||
if authHeader == "" {
|
if authHeader == "" {
|
||||||
a.mongoLoggerSvc.Info("Authorization header missing",
|
a.mongoLoggerSvc.Info("Authorization header missing",
|
||||||
zap.Int("status_code", fiber.StatusUnauthorized),
|
zap.Int("status_code", fiber.StatusUnauthorized),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user