* Strip domain from the cookies header string * * @param {string[]} cookies * @returns {string[]}
(cookies)
| 6 | * @returns {string[]} |
| 7 | */ |
| 8 | function 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 | * |