http response tooling written

This commit is contained in:
2025-12-30 14:42:04 -07:00
parent 493d15eae8
commit c01d700482
14 changed files with 660 additions and 60 deletions
+3 -3
View File
@@ -2,10 +2,10 @@ package site
import "net/http"
func deleteCookieInResponse(w http.ResponseWriter, name string) {
w.Header().Set("Set-Cookie", (&http.Cookie{
func getExpiredCookie(name string) http.Cookie {
return http.Cookie{
Name: name,
Path: "/",
MaxAge: -1, // expire the cookie
}).String())
}
}