Skip to content

ProxyAdapter

ProxyAdapter = object

What the platform supplies to createProxy.

botCategory(request): string | null

The platform’s verified-bot category for this request, such as request.cf.verifiedBotCategory on Cloudflare, or null. Return null when the platform cannot verify bots. No request then bypasses decide, which is safer than trusting a user agent.

Request

string | null


fetch(request): Promise<Response>

The platform’s fetch. The proxy uses it for the upstream site, the tenant and decide.

Request

Promise<Response>


rewriter(): ProxyRewriter

A new ProxyRewriter. The proxy may build several for one request.

ProxyRewriter


warn(code, detail): void

Receives every ProxyWarning with its detail. It must not throw, because the proxy calls it from its own error handling.

ProxyWarning

Record<string, unknown>

void