This commit is contained in:
2026-09-11 14:35:22 -04:00
parent aba185d80a
commit cc182f2ef1
10 changed files with 86 additions and 17 deletions
+1
View File
@@ -0,0 +1 @@
export function assertLocalEndpoint(url) { const parsed = new URL(url); if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') throw new Error('only HTTP(S) model endpoints are supported'); if (!['127.0.0.1', 'localhost', '::1'].includes(parsed.hostname) && process.env.JARVIS_P2P_ENABLE !== '1') throw new Error('network access is disabled unless optional P2P/model fetch is explicitly enabled'); return parsed; }