mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-15 17:25:26 -04:00
Close stale setup and line-ending gaps
This commit is contained in:
@@ -659,7 +659,7 @@ export function isLocalEndpoint(url) {
|
||||
let host;
|
||||
try { host = new URL(url).hostname; } catch (_e) { return true; }
|
||||
if (!host) return true;
|
||||
if (host === 'localhost' || host === '0.0.0.0' || host.endsWith('.local')) return true;
|
||||
if (host === 'localhost' || host === '0.0.0.0' || host === 'host.docker.internal' || host.endsWith('.local')) return true;
|
||||
if (typeof window !== 'undefined' && window.location && host === window.location.hostname) return true;
|
||||
if (/^127\./.test(host)) return true;
|
||||
if (/^10\./.test(host)) return true;
|
||||
|
||||
Reference in New Issue
Block a user