1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-04-02 20:45:47 +03:00
parent 872dd45359
commit c5139b22ee
2 changed files with 14 additions and 1 deletions

View File

@@ -41,6 +41,15 @@ func withCookieOptions(ctx iris.Context) {
// * CookieExpires
// * CookieEncoding
ctx.AddCookieOptions(iris.CookieAllowReclaim())
// ctx.AddCookieOptions(iris.CookieSecure)
// OR for a specific cookie:
// ctx.SetCookieKV("cookie_name", "cookie_value", iris.CookieScure)
// OR by passing a a &http.Cookie:
// ctx.SetCookie(&http.Cookie{
// Name: "cookie_name",
// Value: "cookie_value",
// Secure: true,
// })
ctx.Next()
}