feat(platform): support custom admin path prefix (#25)

This commit is contained in:
Li4n0
2021-05-31 23:03:39 +08:00
committed by GitHub
parent 42d1e35913
commit f7be2bc2e6
31 changed files with 41 additions and 36 deletions
+2 -2
View File
@@ -15,9 +15,9 @@ import (
log "unknwon.dev/clog/v2"
)
func auth(c *gin.Context) {
func (revsuit *Revsuit) auth(c *gin.Context) {
c.SetSameSite(http.SameSiteLaxMode)
c.SetCookie("token", c.Request.Header["Token"][0], 0, "/revsuit/api/", "", false, true)
c.SetCookie("token", c.Request.Header["Token"][0], 0, revsuit.config.AdminPathPrefix, "", false, true)
c.String(200, "pong")
}