(request: {
method?: string;
headers: Record<string, string | string[] | undefined>;
})
| 1 | // The development proxy must not turn cross-origin traffic into trusted RPCs. |
| 2 | export function allowLocalProxy(request: { |
| 3 | method?: string; |
| 4 | headers: Record<string, string | string[] | undefined>; |
| 5 | }): boolean { |
| 6 | const host = request.headers.host; |
| 7 | return ( |
| 8 | (host === "localhost:46308" || host === "127.0.0.1:46308") && |
| 9 | request.headers.origin === `http://${host}` && |
| 10 | request.method === "POST" && |
| 11 | request.headers["x-ach-api-version"] === "1" |
| 12 | ); |
| 13 | } |
no outgoing calls
no test coverage detected