mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 18:20:55 +00:00
remove flag of XSRF cookie
This commit is contained in:
parent
9eda707297
commit
aec5f4b3a5
@ -149,7 +149,8 @@ func (ctx *Context) XSRFToken(key string, expire int64) string {
|
|||||||
token, ok := ctx.GetSecureCookie(key, "_xsrf")
|
token, ok := ctx.GetSecureCookie(key, "_xsrf")
|
||||||
if !ok {
|
if !ok {
|
||||||
token = string(utils.RandomCreateBytes(32))
|
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
|
ctx._xsrfToken = token
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user