Skip to content

ExtraRouteContext

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

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:217

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:215

True when the OAuth PKCE browser flow is configured.


prefix: string;

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

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


serverId: string;

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

Server ID this handler was constructed with.


url: URL;

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

Parsed request URL.