feat(inspector): add local network access support for HTTPS to HTTP connections

This commit is contained in:
Nathan Flurry 2026-01-28 01:37:56 -08:00
parent e984d07c28
commit d1cbd20b83
4 changed files with 83 additions and 2 deletions

View file

@ -1,4 +1,5 @@
import { Zap } from "lucide-react";
import { AlertTriangle, Zap } from "lucide-react";
import { isHttpsToHttpConnection, isLocalNetworkTarget } from "../lib/permissions";
const ConnectScreen = ({
endpoint,
@ -50,6 +51,18 @@ const ConnectScreen = ({
{connectError && <div className="banner error">{connectError}</div>}
{isHttpsToHttpConnection(window.location.href, endpoint) &&
isLocalNetworkTarget(endpoint) && (
<div className="banner warning">
<AlertTriangle size={16} />
<span>
Connecting from HTTPS to a local HTTP server requires{" "}
<strong>local network access</strong> permission. Your browser may prompt you to
allow this connection.
</span>
</div>
)}
<label className="field">
<span className="label">Endpoint</span>
<input