SameSite

is the SameSite attribute of a Set-Cookie header (RFC 6265bis): Strict sends the cookie on same-site requests only, Lax sends it on top-level cross-site navigations as well, and None sends it on every request. A Cookie always carries one and Cookie.set always writes it; the zero value is Lax.

(Cookie.set &(Cookie.set-samesite cookie (SameSite.Strict)))
; => "id=abc; Path=/; SameSite=Strict"

Lax

instantiate

(Fn [] SameSite)

creates a Lax.

None

instantiate

(Fn [] SameSite)

creates a None.

Strict

instantiate

(Fn [] SameSite)

creates a Strict.

copy

instantiate

(Fn [(Ref SameSite a)] SameSite)

copies a SameSite.

delete

instantiate

(Fn [SameSite] ())

deletes a SameSite. This should usually not be called manually.

get-tag

instantiate

(Fn [(Ref SameSite a)] Int)

Gets the tag from a SameSite.

prn

instantiate

(Fn [(Ref SameSite a)] String)

converts a SameSite to a string.

str

instantiate

(Fn [(Ref SameSite a)] String)

converts a SameSite to a string.

zero

defn

(Fn [] SameSite)

                        (zero)