SameSitePolicy
A cookie which can only be sent in requests originating from the same origin as the target domain.
enum SameSitePolicy
This restriction mitigates attacks such as cross-site request forgery (XSRF).
A cookie which can only be sent in requests originating from the same origin as the target domain.
enum SameSitePolicy
This restriction mitigates attacks such as cross-site request forgery (XSRF).
import Vapor
Vapor is a framework for building server applications, APIs and websites in Swift. It provides a safe, performant and scalable foundation for building large complex backends.
struct HTTPCookies
A collection of HTTPCookie
s.
case strict
Strict mode.
case lax
Relaxed mode.
case none
init()
Creates an empty HTTPCookies
init(dictionaryLiteral elements: (String, Value)...)
See ExpressibleByDictionaryLiteral
.
var all: [String : Value] { get set }
All cookies.
subscript(name: String) -> Value? { get set }
Access HTTPCookies
by name
struct Value
A single cookie (key/value pair).
protocol Equatable
A type that can be compared for value equality.
protocol Hashable : Equatable
A type that can be hashed into a Hasher
to produce an integer hash value.
protocol RawRepresentable<RawValue>
A type that can be converted to and from an associated raw value.
protocol Sendable
init?(rawValue: String)
var hashValue: Int { get }
static func != (lhs: Self, rhs: Self) -> Bool
Returns a Boolean value indicating whether two values are not equal.
func hash(into hasher: inout Hasher)