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

Function req

apps/host-selfhost/src/auth/invalid-origin-help.test.ts:5–6  ·  view source on GitHub ↗
(headers: Record<string, string>)

Source from the content-addressed store, hash-verified

3import { invalidOriginHelp, originOf, rewriteInvalidOrigin } from "./invalid-origin-help";
4
5const req = (headers: Record<string, string>) =>
6 new Request("https://svc.internal/api/auth/sign-up/email", { method: "POST", headers });
7
8test("originOf prefers Origin, then x-forwarded-host, then host", () => {
9 expect(originOf(req({ origin: "https://app.example.com" }))).toBe("https://app.example.com");

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected