mirror of
https://github.com/astaxie/beego.git
synced 2025-06-17 15:40:39 +00:00
remove flag of XSRF cookie
This commit is contained in:
@ -149,7 +149,8 @@ func (ctx *Context) XSRFToken(key string, expire int64) string {
|
||||
token, ok := ctx.GetSecureCookie(key, "_xsrf")
|
||||
if !ok {
|
||||
token = string(utils.RandomCreateBytes(32))
|
||||
ctx.SetSecureCookie(key, "_xsrf", token, expire, "", "", true, true)
|
||||
// TODO make it configurable
|
||||
ctx.SetSecureCookie(key, "_xsrf", token, expire, "", "")
|
||||
}
|
||||
ctx._xsrfToken = token
|
||||
}
|
||||
|
Reference in New Issue
Block a user