From d319163688ca5c9fe27cebd50f0f8655827578b2 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 24 Mar 2025 01:34:27 +0800 Subject: main.go: Secure cookie --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 2aa6d87..52dd7e4 100644 --- a/main.go +++ b/main.go @@ -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")) -- cgit v1.2.3