Skip to content

ExtraRouteContext

Defined in: src/http/types.ts:222

What an ExtraRouteHandler is told about the request and the server.

serverId and oauthActive are handler-internal state a caller cannot reconstruct from the outside, and a route that reports server identity needs both. addCorsHeaders is passed rather than re-derived so a contributed route cannot accidentally answer with a different CORS policy than the rest of the surface.

addCorsHeaders: (headers) => void;

Defined in: src/http/types.ts:232

Applies this handler’s configured CORS policy to a response’s headers.

Parameter Type
headers Headers

void


oauthActive: boolean;

Defined in: src/http/types.ts:230

True when the OAuth PKCE browser flow is configured.


prefix: string;

Defined in: src/http/types.ts:226

The mount prefix, without a trailing slash (“” when mounted at root).


serverId: string;

Defined in: src/http/types.ts:228

Server ID this handler was constructed with.


url: URL;

Defined in: src/http/types.ts:224

Parsed request URL.