diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-24 08:54:52 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-24 08:54:52 +0800 |
commit | 99a604a4a704c13ae0d621868e81f8baff2100ee (patch) | |
tree | 2589518493a14893ac22ade12102d68a3a94a1fd | |
parent | identifier.go: Remove paranoid checks for buffer lengths (diff) | |
download | powxy-99a604a4a704c13ae0d621868e81f8baff2100ee.tar.gz powxy-99a604a4a704c13ae0d621868e81f8baff2100ee.tar.zst powxy-99a604a4a704c13ae0d621868e81f8baff2100ee.zip |
main.go: Set HttpOnly on cookiev0.1.9
-rw-r--r-- | main.go | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -90,9 +90,10 @@ func main() { } http.SetCookie(writer, &http.Cookie{ - Name: "powxy", - Value: base64.StdEncoding.EncodeToString(expectedMAC), - Secure: true, + Name: "powxy", + Value: base64.StdEncoding.EncodeToString(expectedMAC), + Secure: true, + HttpOnly: true, }) log.Println("ACCEPTED", getRemoteIP(request), request.RequestURI, request.Header.Get("User-Agent")) |