DeleteAdminCookie sets the response cookie to empty
(gc *gin.Context, adminCookieSecure bool)
| 53 | |
| 54 | // DeleteAdminCookie sets the response cookie to empty |
| 55 | func DeleteAdminCookie(gc *gin.Context, adminCookieSecure bool) { |
| 56 | c := BuildDeleteAdminCookie(parsers.GetHost(gc), adminCookieSecure) |
| 57 | gc.SetSameSite(c.SameSite) |
| 58 | gc.SetCookie(c.Name, c.Value, c.MaxAge, c.Path, c.Domain, c.Secure, c.HttpOnly) |
| 59 | } |
| 60 | |
| 61 | // BuildDeleteAdminCookie returns a zero-value, expired admin cookie that causes |
| 62 | // browsers to delete the admin session cookie. Transport-agnostic mirror of |
nothing calls this directly
no test coverage detected