Files
inventory-plus-plus/internal/site/cookie.go
T
2025-12-29 23:49:23 -07:00

12 lines
226 B
Go

package site
import "net/http"
func deleteCookieInResponse(w http.ResponseWriter, name string) {
w.Header().Set("Set-Cookie", (&http.Cookie{
Name: name,
Path: "/",
MaxAge: -1, // expire the cookie
}).String())
}