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

Function validateCookieDomain

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

* I have no idea why these values aren't allowed to be honest, * but Deno tests these. - Khafra * @param {string} domain

(domain)

Source from the content-addressed store, hash-verified

119 * @param {string} domain
120 */
121function validateCookieDomain (domain) {
122 if (
123 domain.startsWith('-') ||
124 domain.endsWith('.') ||
125 domain.endsWith('-')
126 ) {
127 throw new Error('Invalid cookie domain')
128 }
129}
130
131const IMFDays = [
132 'Sun', 'Mon', 'Tue', 'Wed',

Callers 1

stringifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected