diff options
author | Runxi Yu <me@runxiyu.org> | 2025-03-24 01:34:27 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-03-24 01:34:27 +0800 |
commit | d319163688ca5c9fe27cebd50f0f8655827578b2 (patch) | |
tree | e49b17a1fc131d0a2d6cb552690f857e582f86af | |
parent | identifier.go: Remove many elements (some mobile browsers mess it up?) (diff) | |
download | powxy-d319163688ca5c9fe27cebd50f0f8655827578b2.tar.gz powxy-d319163688ca5c9fe27cebd50f0f8655827578b2.tar.zst powxy-d319163688ca5c9fe27cebd50f0f8655827578b2.zip |
main.go: Secure cookie
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -89,8 +89,9 @@ func main() { } http.SetCookie(writer, &http.Cookie{ - Name: "powxy", - Value: base64.StdEncoding.EncodeToString(expectedMAC), + Name: "powxy", + Value: base64.StdEncoding.EncodeToString(expectedMAC), + Secure: true, }) log.Println("ACCEPTED", getRemoteIP(request), request.RequestURI, request.Header.Get("User-Agent")) |