1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

Some minor but helpful additions, like CookieOption. Relative: https://github.com/kataras/iris/issues/1018. Simple cookies example added too. Cookie encoding (side by side with the already session's cookie id encoding) and version upgrade will come tomorrow with a new HISTORY.md entry as well, stay tuned!

Former-commit-id: d14181fac998d32d77690b1b3e42b6c7c72f1ace
This commit is contained in:
Gerasimos Maropoulos
2018-06-02 07:28:40 +03:00
parent f84248cb4e
commit fcff62d5b4
8 changed files with 277 additions and 30 deletions

22
iris.go
View File

@@ -422,6 +422,28 @@ var (
//
// A shortcut of the `cache#Cache304`.
Cache304 = cache.Cache304
// CookiePath is a `CookieOption`.
// Use it to change the cookie's Path field.
//
// A shortcut for the `context#CookiePath`.
CookiePath = context.CookiePath
// CookieCleanPath is a `CookieOption`.
// Use it to clear the cookie's Path field, exactly the same as `CookiePath("")`.
//
// A shortcut for the `context#CookieCleanPath`.
CookieCleanPath = context.CookieCleanPath
// CookieExpires is a `CookieOption`.
// Use it to change the cookie's Expires and MaxAge fields by passing the lifetime of the cookie.
//
// A shortcut for the `context#CookieExpires`.
CookieExpires = context.CookieExpires
// CookieHTTPOnly is a `CookieOption`.
// Use it to set the cookie's HttpOnly field to false or true.
// HttpOnly field defaults to true for `RemoveCookie` and `SetCookieKV`.
//
// A shortcut for the `context#CookieHTTPOnly`.
CookieHTTPOnly = context.CookieHTTPOnly
)
// SPA accepts an "assetHandler" which can be the result of an