aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-03-24 08:54:52 +0800
committerRunxi Yu <me@runxiyu.org>2025-03-24 08:54:52 +0800
commit99a604a4a704c13ae0d621868e81f8baff2100ee (patch)
tree2589518493a14893ac22ade12102d68a3a94a1fd
parentidentifier.go: Remove paranoid checks for buffer lengths (diff)
downloadpowxy-0.1.9.tar.gz
powxy-0.1.9.tar.zst
powxy-0.1.9.zip
main.go: Set HttpOnly on cookiev0.1.9
-rw-r--r--main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.go b/main.go
index e900933..73808d8 100644
--- a/main.go
+++ b/main.go
@@ -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"))