Update Readme: Added HttpOnly, Secure flags for setting the cookie
This commit is contained in:
parent
667fe4e346
commit
f5b37263f0
1 changed files with 2 additions and 0 deletions
|
@ -45,6 +45,8 @@ func SetCookieHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
Name: "cookie-name",
|
Name: "cookie-name",
|
||||||
Value: encoded,
|
Value: encoded,
|
||||||
Path: "/",
|
Path: "/",
|
||||||
|
Secure: true,
|
||||||
|
HttpOnly: true,
|
||||||
}
|
}
|
||||||
http.SetCookie(w, cookie)
|
http.SetCookie(w, cookie)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue