@buntal/core - Http

CookieOptions

Configuration options for HTTP cookies in Buntal applications.

Source

View source on GitHub

Type Definition

type CookieOptions = {
  maxAge?: number
  expires?: Date
  path?: string
  domain?: string
  secure?: boolean
  httpOnly?: boolean
  sameSite?: 'Strict' | 'Lax' | 'None'
}

Properties

PropertyTypeRequiredDefaultDescription
maxAgenumber-Cookie lifetime in seconds
expiresDate-Expiration date for the cookie
pathstring/URL path where the cookie is valid
domainstring-Domain where the cookie is valid
securebooleanfalseWhether cookie should only be sent over HTTPS
httpOnlybooleanfalseWhether cookie should be inaccessible to JavaScript
sameSite'Strict' | 'Lax' | 'None'LaxControls cross-site request behavior

Last modified: 2025-06-10

Content-Length: 0