mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 18:35:51 +02:00
feat(header): add self check error banner
This commit is contained in:
parent
309ca81ee3
commit
597175940f
8 changed files with 187 additions and 55 deletions
|
@ -18,15 +18,15 @@ func getToken(c *gin.Context) (token string) {
|
|||
return
|
||||
}
|
||||
|
||||
if token, _ = c.Cookie("token"); token != "" {
|
||||
return token
|
||||
}
|
||||
|
||||
if token = c.Query("token"); token != "" {
|
||||
tokenBytes, _ := base64.StdEncoding.DecodeString(token)
|
||||
return string(tokenBytes)
|
||||
}
|
||||
|
||||
if token, _ = c.Cookie("token"); token != "" {
|
||||
return token
|
||||
}
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue