Check pasted preflight and response headers against the CORS rules
border_check_cors_headersUse when a CORS problem involves a server Border cannot reach (localhost, a dev or staging server, a private network, a custom port) or a POST, PUT, PATCH or DELETE whose real response needs checking, and the raw response headers are available from curl -i or the browser DevTools Network tab (signals: "here is the OPTIONS response", "my local API returns these headers", "CORS works on localhost but not in production", "preflight response is"). Parses the pasted OPTIONS response and/or the actual response (status line plus headers; curl -i, curl -v, curl -iL with redirects, and DevTools copies are all read) and applies the Fetch standard CORS rules as Chrome implements them, for the given page origin, method, request headers and credentials mode. Returns the same result as border_check_cors: verdict, the exact Chrome console error, the failing step and reason, warnings, the response headers that fix it, and the curl commands to capture any missing response. Nothing is fetched. Example: {"url":"http://localhost:8000/api/login","origin":"http://localhost:5173","method":"POST","headers":["Content-Type: application/json"],"credentials":true,"preflight_response":"HTTP/1.1 200 OK\nAccess-Control-Allow-Origin: *\nAccess-Control-Allow-Headers: content-type"}. Limits: the verdict is only as complete as the pasted headers; a preflighted request needs both pastes for a full answer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"origin": "<origin>"
},
"name": "border_check_cors_headers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The API address the page calls, for example "https://api.example.com/v1/items". | |
| method | No | HTTP method the page uses (default GET), for example "POST", "PUT", "PATCH" or "DELETE". | |
| origin | Yes | The origin of the page that makes the request: scheme, host and port, for example "https://app.example.com" or "http://localhost:5173". A full page URL is reduced to its origin. | |
| headers | No | Request headers the page sets in fetch() or axios, as "Name" or "Name: value". Values matter only for Content-Type, Accept, Accept-Language, Content-Language and Range; give names alone for Authorization and API keys. Example: ["Content-Type: application/json","Authorization"]. | |
| response | No | The raw response to the actual request: status line and headers from curl -i (curl -iL output with redirects is read hop by hop) or DevTools. Bodies are ignored. | |
| credentials | No | true when the request sends cookies: fetch credentials: "include", XHR or axios withCredentials: true. Default false. | |
| read_headers | No | Response headers the page code reads with response.headers.get(), for example ["X-Total-Count","ETag"]. Checked against Access-Control-Expose-Headers. | |
| preflight_response | No | The raw OPTIONS (preflight) response: status line and headers, as printed by curl -i -X OPTIONS (see the curl.preflight command in any result) or copied from DevTools. |