HttpCookie Module
Functions and values
| Function or value | Description |
Full Usage:
create name value expires path domain secure httpOnly sameSite
Parameters:
string
value : string
expires : DateTimeOffset option
path : string option
domain : string option
secure : bool
httpOnly : bool
sameSite : SameSite option
Returns: HttpCookie
|
|
|
Create a new cookie with the given name, value, and defaults: - no explicit expiry time - path at "/", so that it's global to the domain that it's created under. - no specific domain (defaults to the current domain plus its subdomains) - `secure = false` (you can set it over plain text HTTP - change to true in SSL terminator) - `httpOnly = true` - the cookie can be read from JS - change this to false if you want to only be able to read the cookie from JS, but Good default if you're implementing session handling. - `version`: an optional version field More reading: - http://www.nczonline.net/blog/2009/05/05/http-cookies-explained/ - https://developer.mozilla.org/en-US/docs/Web/API/document.cookie
|
|
|
|