MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / originPort

Function originPort

apps/cli/src/main.ts:2829–2829  ·  view source on GitHub ↗
(url: URL)

Source from the content-addressed store, hash-verified

2827const LOCAL_SERVICE_HOSTS = new Set(["localhost", "127.0.0.1", "::1", "[::1]"]);
2828
2829const originPort = (url: URL): string => url.port || (url.protocol === "https:" ? "443" : "80");
2830
2831const sameServerOrigin = (left: string, right: string): boolean => {
2832 const leftUrl = new URL(normalizeExecutorServerConnection({ origin: left }).origin);

Callers 1

sameServerOriginFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected