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.
Properties
Section titled “Properties”addCorsHeaders
Section titled “addCorsHeaders”addCorsHeaders: (headers) => void;Defined in: src/http/types.ts:232
Applies this handler’s configured CORS policy to a response’s headers.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
headers |
Headers |
Returns
Section titled “Returns”void
oauthActive
Section titled “oauthActive”oauthActive: boolean;Defined in: src/http/types.ts:230
True when the OAuth PKCE browser flow is configured.
prefix
Section titled “prefix”prefix: string;Defined in: src/http/types.ts:226
The mount prefix, without a trailing slash (“” when mounted at root).
serverId
Section titled “serverId”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.
