mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +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.Value = ""
|
||||||
c.Path = "/"
|
c.Path = "/"
|
||||||
AddCookie(ctx, c, purge)
|
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
|
// IsValidCookieDomain returns true if the receiver is a valid domain to set
|
||||||
|
|
Loading…
Reference in New Issue
Block a user