fix: align admin behavior and Kratos integrations
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
package handler
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"kra/internal/server/httpx"
|
||||
"kra/internal/service"
|
||||
|
||||
@@ -21,6 +19,6 @@ func (h *Session) Logout(c *gin.Context) {
|
||||
httpx.Fail(c, "退出失败")
|
||||
return
|
||||
}
|
||||
http.SetCookie(c.Writer, &http.Cookie{Name: "x-token", Value: "", Path: "/", MaxAge: -1, HttpOnly: true})
|
||||
httpx.SetTokenCookie(c, "", -1)
|
||||
httpx.OK(c)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user