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