Skip to content
Kitenzo Headless is currently invite-only. To enable it on your store, email support@kitenzo.com.

CORS & allowed origins

The headless API is designed to be called directly from the browser, so it implements CORS server-side. There’s no proxy to run — the backend decides which origins may call it based on each key’s allowed origins list.

Each API key has an allowed_origins list (set when you create the key):

  • Empty or containing *all origins allowed.
  • Otherwise → only the exact origins listed (trailing slashes are ignored).
https://mystore.com, https://staging.mystore.com

For requests under /api/headless/v1/, the backend returns:

HeaderValue
Access-Control-Allow-Originthe requesting origin (when allowed)
Access-Control-Allow-Credentialstrue
Access-Control-Allow-MethodsGET, POST, OPTIONS
Access-Control-Allow-HeadersAuthorization, Content-Type
Access-Control-Max-Age86400
VaryOrigin
  • Preflight (OPTIONS) requests can’t carry the Authorization header, so the backend checks whether any active key for the shop allows the origin, and responds 204 No Content with CORS headers if so.
  • On a normal request, CORS headers are only set once the API key is authenticated and the origin is in that key’s allowed list.

Server-to-server calls (SSR loaders, build steps, cURL) aren’t subject to CORS. Keep the key in a server-only environment variable and call the API directly.