Skip to content

Commit

Permalink
wip: fix cookies magento
Browse files Browse the repository at this point in the history
  • Loading branch information
IncognitaDev committed Dec 18, 2024
1 parent b968ddb commit 1b077c3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions magento/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export const proxySetCookie = (
) => {
const domain = toDomain && new URL(toDomain);
const newDomain = domain && !domain.hostname.includes("localhost")
? new URL(getTopDomain(domain.hostname))
: domain;
? `.${getTopDomain(domain.hostname)}`
: (domain as URL)?.hostname;

console.log({ newDomain });

Expand All @@ -20,7 +20,7 @@ export const proxySetCookie = (
const newCookie = newDomain
? {
...cookie,
domain: newDomain.hostname,
domain: newDomain,
}
: cookie;

Expand Down

0 comments on commit 1b077c3

Please sign in to comment.