1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-11 05:55:57 +00:00

fix https://github.com/kataras/iris/issues/1485 by adding and using the new 'context.UpsertCookie' instead of 'context.SetCookie'

Former-commit-id: 31a50e580929616504b9bbbb1d602b0e9274a568
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-04-13 09:27:49 +03:00
parent e1d3cad905
commit 989ac436e8
4 changed files with 56 additions and 7 deletions

View File

@@ -36,7 +36,8 @@ func AddCookie(ctx context.Context, cookie *http.Cookie, reclaim bool) {
if reclaim {
ctx.Request().AddCookie(cookie)
}
ctx.SetCookie(cookie)
ctx.UpsertCookie(cookie)
}
// RemoveCookie deletes a cookie by it's name/key