We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca815c0 commit e445039Copy full SHA for e445039
web.go
@@ -192,7 +192,7 @@ func protectedMiddleware() gin.HandlerFunc {
192
}
193
194
authToken, err := c.Cookie("authToken")
195
- if err != nil || authToken != config.LocalAuthToken {
+ if err != nil || authToken != config.LocalAuthToken || authToken == "" {
196
c.JSON(http.StatusUnauthorized, gin.H{"error": "Unauthorized"})
197
c.Abort()
198
return
0 commit comments