mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 09:40:56 +00:00
rollback: set httponly default is false.
This commit is contained in:
parent
7bacb25725
commit
50bc1ef757
@ -135,12 +135,12 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface
|
||||
}
|
||||
}
|
||||
|
||||
// default true
|
||||
httponly := true
|
||||
// default false. for session cookie default true
|
||||
httponly := false
|
||||
if len(others) > 4 {
|
||||
if v, ok := others[4].(bool); ok && !v || others[4] == nil {
|
||||
// HttpOnly = false
|
||||
httponly = false
|
||||
if v, ok := others[4].(bool); ok && v {
|
||||
// HttpOnly = true
|
||||
httponly = true
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user