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

Function isSameOrigin

apps/cli/src/device-login.ts:138–144  ·  view source on GitHub ↗
(url: string, origin: string)

Source from the content-addressed store, hash-verified

136 >;
137
138const isSameOrigin = (url: string, origin: string): boolean => {
139 try {
140 return new URL(url).origin === new URL(origin).origin;
141 } catch {
142 return false;
143 }
144};
145
146const headersForUrl = (
147 url: string,

Callers 1

headersForUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected