mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 02:31:04 +01:00
need a better way to replace an existed cookie
Former-commit-id: bee4a686d50e61e607e7f86c1dee93a877cd1413
This commit is contained in:
parent
859a62bf01
commit
c6b12ab754
|
@ -53,6 +53,11 @@ func RemoveCookie(ctx context.Context, name string, purge bool) {
|
|||
c.Value = ""
|
||||
c.Path = "/"
|
||||
AddCookie(ctx, c, purge)
|
||||
|
||||
if purge {
|
||||
// delete request's cookie also, which is temporary available.
|
||||
ctx.Request().Header.Set("Cookie", "")
|
||||
}
|
||||
}
|
||||
|
||||
// IsValidCookieDomain returns true if the receiver is a valid domain to set
|
||||
|
|
Loading…
Reference in New Issue
Block a user