feat: login wall (#42)
* feat: add login-wall app * fix: rename vars * fix: rename vars * update docker file * add validations for app state * add host check for app * fix: docker file
This commit is contained in:
@@ -12,8 +12,8 @@ func SetCookie(gc *gin.Context, token string) {
|
||||
secure := true
|
||||
httpOnly := true
|
||||
|
||||
host := GetDomainName(gc.Request.Host)
|
||||
log.Println("=> host", host)
|
||||
host := GetHostName(gc.Request.Host)
|
||||
log.Println("=> cookie host", host)
|
||||
gc.SetSameSite(http.SameSiteNoneMode)
|
||||
gc.SetCookie(constants.COOKIE_NAME, token, 3600, "/", host, secure, httpOnly)
|
||||
}
|
||||
@@ -35,7 +35,7 @@ func DeleteCookie(gc *gin.Context) {
|
||||
secure = false
|
||||
}
|
||||
|
||||
host := GetDomainName(gc.Request.Host)
|
||||
host := GetHostName(gc.Request.Host)
|
||||
gc.SetSameSite(http.SameSiteNoneMode)
|
||||
gc.SetCookie(constants.COOKIE_NAME, "", -1, "/", host, secure, httpOnly)
|
||||
}
|
||||
|
Reference in New Issue
Block a user