MCPcopy Create free account
hub / github.com/bigcommerce/stencil-cli / stripDomainFromCookies

Function stripDomainFromCookies

server/lib/utils.js:8–12  ·  view source on GitHub ↗

* Strip domain from the cookies header string * * @param {string[]} cookies * @returns {string[]}

(cookies)

Source from the content-addressed store, hash-verified

6 * @returns {string[]}
7 */
8function stripDomainFromCookies(cookies) {
9 return cookies.map((val) =>
10 val.replace(/(?:;\s)?domain=(?:.+?)(;|$)/gi, '$1').replace(/; SameSite=none/gi, ''),
11 );
12}
13/**
14 * Strip domain from redirectUrl if it matches the current storeUrl, if not, leave it.
15 *

Callers 1

renderer.module.jsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected