mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
feat: allow insecure cookies (resolve #27)
This commit is contained in:
@@ -13,12 +13,12 @@ func RespondJSON(w http.ResponseWriter, status int, object interface{}) {
|
||||
}
|
||||
}
|
||||
|
||||
func ClearCookie(w http.ResponseWriter, name string) {
|
||||
func ClearCookie(w http.ResponseWriter, name string, secure bool) {
|
||||
http.SetCookie(w, &http.Cookie{
|
||||
Name: name,
|
||||
Value: "",
|
||||
Path: "/",
|
||||
Secure: true,
|
||||
Secure: secure,
|
||||
HttpOnly: true,
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user