Service
Liveness check.
Diagnostics: shows exactly what reached the origin — method, headers, cf-ray, body. If an attack was blocked at the edge, this never fires.
Catalog (public)
List all customers (fake data).
Fetch one customer by id.
Schema validation demo (API Shield)
Valid payload — passes schema and reaches the origin (201 Created).
After enabling API Shield schema validation, attacks like the one below are blocked at the edge with 403 — Security Events shows the rule.
Malformed payload — invalid tier and string credit limit. Today the origin rejects it (422); with API Shield it is blocked at the edge before this server.
More schema violations (query, path, header, extra field)
Query violation — limit above 100 and an unknown tier.
Path violation — the id must be an integer between 1 and 1,000,000.
Header violation — valid body, but X-Request-Id is not a UUID.
Extra field — mass-assignment style property not defined in the schema.
Session identifiers (API Shield)
Configure up to three identifiers in Security → Settings → API abuse: cookie lab_session, header X-Session-Id and JWT claim (sub). Login first, then compare what the origin received.
Creates one session and returns it three ways: Bearer JWT, lab_session cookie and a session id for X-Session-Id.
All three carriers. Origin shows which ones arrived and which are valid.
Bearer only (no cookie, no header).
X-Session-Id header only.
Cookie only (browser sends lab_session automatically).
Anonymous (no carrier, no cookie).
JWT validation — Token Lab (API Shield)
Each button mints a token on the server and sends it to GET /api/orders. With the JWT validation configuration and rule from the guide, Edge shows what Cloudflare decides before the origin; Origin is what the application returns when the request arrives. Public key: /.well-known/jwks.json (ES256).
Sequence — login → cart → quote → confirm (API Shield)
Valid order: POST /api/cart/items → POST /api/checkout/quote → POST /api/checkout/confirm. Each button below starts a fresh session. Today the origin enforces the order (409). With a sequence rule at the edge (closed beta) the same wrong order is blocked before the origin (403). Sequence Analytics learns the valid order from real traffic.
Auth flow (JWT)
Issues a demo JWT (HS256). The token is kept in your browser and used by the orders calls.
Protected route — requires a valid bearer token.