fix: fix the bug that authentication always fails after token change (#59)

This commit is contained in:
Li4n0
2022-09-14 01:06:26 +08:00
committed by GitHub
parent fe316220a1
commit 3fa2cae862
2 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ import (
func (revsuit *Revsuit) auth(c *gin.Context) {
c.SetSameSite(http.SameSiteLaxMode)
c.SetCookie("token", c.Request.Header["Token"][0], 0, revsuit.config.AdminPathPrefix, "", false, true)
c.SetCookie("token", c.Request.Header.Get("Token"), 0, revsuit.config.AdminPathPrefix, "", false, true)
c.String(200, "pong")
}