imjoey commented on a change in pull request #1206:
URL: https://github.com/apache/apisix-dashboard/pull/1206#discussion_r551733304
##########
File path: api/internal/filter/authentication.go
##########
@@ -41,8 +42,8 @@ func Authentication() gin.HandlerFunc {
"message": "Request Unauthorized",
}
- if err != nil || !token.Valid {
- log.Warnf("token validate failed: %s, %v", err,
token.Valid)
+ if err != nil || token == nil || !token.Valid {
+ log.Warnf("token validate failed: %s, %v", err,
false)
Review comment:
@starsz Thanks. It's to keep log format that same as before. How about
change this to
```suggestion
log.Warnf("token validate failed: %s", err)
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]