Parameters
- id: string | number | null
- url: string | undefined
- fetchImpl: {
(input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
(input: string | URL | Request, init?: RequestInit): Promise<Response>;
} = globalThis.fetch- (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
Parameters
- input: URL | RequestInfo
Optionalinit: RequestInit
Returns Promise<Response>
- (input: string | URL | Request, init?: RequestInit): Promise<Response>
Parameters
- input: string | URL | Request
Optionalinit: RequestInit
Returns Promise<Response>
A JSON-RPC success envelope with the response body, or an error
envelope describing why the URL was rejected.
JSON-RPC handler for the proxy's
fetch_urlmethod.Validates the requested URL against the IMF allow-list (protocol, hostname, path prefix), forwards it via
fetchImpl, and returns the response body wrapped in a JSON-RPC success envelope. Disallowed URLs return a JSON-RPC error envelope rather than throwing.