🍪Set Cookie

The Set Cookie node is used to set a cookie on a client's browser, by sending a "Set-Cookie" header in the server's response.

Options

Key

This is the name of the cookie.

Value

This is the value to be stored in the cookie.

Max age

This is the maximum age of the cookie, in seconds. If not set, the cookie will expire at the end of the session (when the browser is closed).

Expires

This is the expiration date of the cookie, specified as a date string.

Path

This is the cookie's path, which defaults to "/".

Domain

This is the cookie's domain.

Secure

This indicates that the cookie should only be sent over HTTPS.

HTTP only

This indicates that the cookie should only be accessible through the HTTP protocol (i.e. JavaScript cannot access it).

Same site

This attribute controls the cookie's behaviour during cross-site requests to help prevent cross-site scripting (XSS) attacks.

Option
Description

None

The cookie will be sent with requests made from the same origin as the current page and some requests from other origins, with limited support among modern browsers, specifically, Chrome supports it and Firefox and Safari default to the 'lax' value if the attribute is not set.

Lax

The cookie will be sent with requests made from the same origin as the current page, as well as with "safe" requests made from other origins, providing a balance between security and functionality.

Strict

The cookie will only be sent with requests made from the same origin as the current page, providing the highest level of security against cross-site scripting (XSS) attacks.

Output

Returns the current dataset.

Last updated