TypeScript API / contentia/server/mcp / resolveApiRequestUrl
Function: resolveApiRequestUrl()
ts
function resolveApiRequestUrl(apiUrl, path): URL | null;Normalize-then-check path gate for api_request. Normalizing FIRST is what makes ${basePath}/../oauth2/token fail the check — the URL parser collapses dot segments, so the gate sees the real target path. apiUrl is the absolute URL of the JSON:API root (origin + base path); the resolved request must stay on its origin and under its path.
Parameters
| Parameter | Type |
|---|---|
apiUrl | string |
path | string |
Returns
URL | null