Set cookie to http only
This commit is contained in:
parent
4cf50a7d81
commit
56f98a9c14
@ -60,9 +60,10 @@ func (u Users) PostSignin(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
// Bad cookie
|
// Bad cookie
|
||||||
cookie := http.Cookie{
|
cookie := http.Cookie{
|
||||||
Name: "bad",
|
Name: "bad",
|
||||||
Value: user.Email,
|
Value: user.Email,
|
||||||
Path: "/",
|
Path: "/",
|
||||||
|
HttpOnly: true,
|
||||||
}
|
}
|
||||||
http.SetCookie(w, &cookie)
|
http.SetCookie(w, &cookie)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user