mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 19:10:54 +00:00
setcookie set to unique. fix multi setcookie
This commit is contained in:
parent
a242f61b8e
commit
f46388fa63
@ -95,7 +95,7 @@ func (ctx *Context) SetCookie(name string, value string, others ...interface{})
|
|||||||
if len(others) > 4 {
|
if len(others) > 4 {
|
||||||
fmt.Fprintf(&b, "; HttpOnly")
|
fmt.Fprintf(&b, "; HttpOnly")
|
||||||
}
|
}
|
||||||
ctx.SetHeader("Set-Cookie", b.String(), true)
|
ctx.SetHeader("Set-Cookie", b.String(), false)
|
||||||
}
|
}
|
||||||
|
|
||||||
var cookieNameSanitizer = strings.NewReplacer("\n", "-", "\r", "-")
|
var cookieNameSanitizer = strings.NewReplacer("\n", "-", "\r", "-")
|
||||||
|
Loading…
Reference in New Issue
Block a user