mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-17 02:04:13 +00:00
feat(inspector): add local network access support for HTTPS to HTTP connections
This commit is contained in:
parent
e984d07c28
commit
d1cbd20b83
4 changed files with 83 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue