fix: parse cookie domain (#185)
* chore: update bots and referrers * fix: handle cookie domain better
This commit is contained in:
committed by
GitHub
parent
0b4fcbad69
commit
280065c2c4
@@ -1,11 +1,4 @@
|
||||
// Sorry co.uk, but you're not a top domain
|
||||
const parseCookieDomain = (url: string) => {
|
||||
const domain = new URL(url);
|
||||
return {
|
||||
domain: domain.hostname.split('.').slice(-2).join('.'),
|
||||
secure: domain.protocol === 'https:',
|
||||
};
|
||||
};
|
||||
import { parseCookieDomain } from './parse-cookie-domain';
|
||||
|
||||
const parsed = parseCookieDomain(process.env.NEXT_PUBLIC_DASHBOARD_URL ?? '');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user