HTTP cacheability, CORS and redirect-loop explainer
Explains from supplied response headers (and optionally the request's headers, a CORS request, and a redirect chain) whether a shared and a private HTTP cache may store the response (RFC 9111 section 3), its freshness lifetime and basis (s-maxage, max-age, Expires minus Date, or the 10% Last-Modified heuristic), Vary, invalid max-age or Expires, the CORS check and preflight outcome per the Fetch Standard (Allow-Origin, Allow-Credentials, Allow-Methods/Headers, Vary: Origin), and a redirect loop or the 20-redirect limit. For developers and agents debugging stale or leaking caches. Does NOT fetch anything, read a clock (lifetimes are not compared to now), model a specific CDN's overrides, or evaluate Cache-Control extensions such as stale-while-revalidate.
What you get
Turns a block of headers into a reasoned cacheability and CORS verdict instead of a guess.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/http-cache-explain. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/http-cache-explain \
-H 'content-type: application/json' \
-d '{"response":{"status":200,"headers":[{"name":"Cache-Control","value":"public, max-age=300"},{"name":"Access-Control-Allow-Origin","value":"https://app.example"},{"name":"Date","value":"Tue, 03 Nov 2026 10:00:00 GMT"}]},"cors":{"origin":"https://app.example"}}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
response | object | yes | |
request | object | no | |
cors | object | no | |
redirects | array<object>; max 30 items | no |
Example request body
{
"response": {
"status": 200,
"headers": [
{
"name": "Cache-Control",
"value": "public, max-age=300"
},
{
"name": "Access-Control-Allow-Origin",
"value": "https://app.example"
},
{
"name": "Date",
"value": "Tue, 03 Nov 2026 10:00:00 GMT"
}
]
},
"cors": {
"origin": "https://app.example"
}
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
shared | object | no | |
private | object | no | |
cacheControl | object | no | Parsed Cache-Control directives (first occurrence wins). |
vary | array<string> | no | |
ageSeconds | any | no | Age header value or null. |
cors | any | no | CORS check outcome {ok, issues, acao, maxAgeSeconds}; null when no cors input. |
redirects | any | no | {count, loop, limitExceeded, hops}; null when no redirects input. |
warnings | array<string> | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the infra-preflight-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent