mirror of
https://github.com/PeterMaquiran/tvone.git
synced 2026-04-23 04:25:51 +00:00
remove afety: avoid setting cookie on known public suffix-like domains
This commit is contained in:
+9
-9
@@ -26,16 +26,16 @@ const PUBLIC_SUFFIX_BLOCKLIST = new Set([
|
||||
const rootDomain = parts.slice(-2).join(".");
|
||||
|
||||
// 5. Safety: avoid setting cookie on known public suffix-like domains
|
||||
const unsafeTlds = new Set([
|
||||
"vercel.app",
|
||||
"netlify.app",
|
||||
"github.io",
|
||||
"firebaseapp.com",
|
||||
]);
|
||||
// const unsafeTlds = new Set([
|
||||
// "vercel.app",
|
||||
// "netlify.app",
|
||||
// "github.io",
|
||||
// "firebaseapp.com",
|
||||
// ]);
|
||||
|
||||
if (unsafeTlds.has(rootDomain)) {
|
||||
return undefined;
|
||||
}
|
||||
// if (unsafeTlds.has(rootDomain)) {
|
||||
// return undefined;
|
||||
// }
|
||||
|
||||
return `.${rootDomain}`;
|
||||
}
|
||||
Reference in New Issue
Block a user