rollback: set httponly default is false.
Showing
1 changed file
with
5 additions
and
5 deletions
| ... | @@ -135,12 +135,12 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface | ... | @@ -135,12 +135,12 @@ func (output *BeegoOutput) Cookie(name string, value string, others ...interface |
| 135 | } | 135 | } |
| 136 | } | 136 | } |
| 137 | 137 | ||
| 138 | // default true | 138 | // default false. for session cookie default true |
| 139 | httponly := true | 139 | httponly := false |
| 140 | if len(others) > 4 { | 140 | if len(others) > 4 { |
| 141 | if v, ok := others[4].(bool); ok && !v || others[4] == nil { | 141 | if v, ok := others[4].(bool); ok && v { |
| 142 | // HttpOnly = false | 142 | // HttpOnly = true |
| 143 | httponly = false | 143 | httponly = true |
| 144 | } | 144 | } |
| 145 | } | 145 | } |
| 146 | 146 | ... | ... |
-
Please register or sign in to post a comment