MCPcopy Create free account
hub / github.com/nodejs/node / validateCookieMaxAge

Function validateCookieMaxAge

deps/undici/src/lib/web/cookies/util.js:199–203  ·  view source on GitHub ↗

max-age-av = "Max-Age=" non-zero-digit *DIGIT ; In practice, both expires-av and max-age-av ; are limited to dates representable by the ; user agent. * @param {number} maxAge

(maxAge)

Source from the content-addressed store, hash-verified

197 * @param {number} maxAge
198 */
199function validateCookieMaxAge (maxAge) {
200 if (maxAge < 0) {
201 throw new Error('Invalid cookie max-age')
202 }
203}
204
205/**
206 * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1

Callers 1

stringifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected