Make session cookie HttpOnly and Secure
This commit is contained in:
parent
967e918df1
commit
92529640d6
@ -126,6 +126,8 @@ func createSessionCookie(app *app.App, w http.ResponseWriter, username string) (
|
|||||||
Value: token,
|
Value: token,
|
||||||
Path: "/",
|
Path: "/",
|
||||||
MaxAge: 86400,
|
MaxAge: 86400,
|
||||||
|
HttpOnly: true,
|
||||||
|
Secure: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
http.SetCookie(w, cookie)
|
http.SetCookie(w, cookie)
|
||||||
|
Loading…
Reference in New Issue
Block a user