CIDR Range Calculator
Work out a subnet: network, broadcast, host range and usable count.
Generate correct CORS headers, and understand why the request was blocked.
The CORS Header Generator produces the headers your server needs and explains what the browser will then permit — including the credentials rule and the preflight response that catch almost everyone out.
CORS is a browser restriction, not a server one, and almost every confusing thing about it follows from that. This generates the headers your server needs to send, with each one explained in terms of what the browser will then permit.
The rules that catch people are handled explicitly. A wildcard origin cannot be combined with credentials — browsers reject it — so if you need cookies you must echo a specific origin and add Vary: Origin so caches do not serve the wrong one. A preflight OPTIONS request must be answered before the real request is sent, and must list the methods and headers you allow. Response headers your JavaScript needs to read must be named in Access-Control-Expose-Headers, or they are invisible even though they arrived.
A wildcard origin cannot be combined with credentials, and the generator refuses the combination rather than producing a header browsers will reject.
When a specific origin is echoed, the Vary header comes with it — without which a cache will serve one origin’s response to another.
The OPTIONS response is generated too, since a missing preflight answer means the real request is never sent.
Why your JavaScript cannot read a header that clearly arrived, and which directive fixes it.
Apache, nginx, Express and Laravel snippets, not just a list of header names.
A wildcard for a public API, or specific origins when credentials are involved.
What the preflight response should permit for the real request.
Cookies and Authorization headers need this on, which rules out the wildcard.
Apache, nginx, Express, Laravel and a raw header list are all generated.
Because you are also sending credentials. Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true cannot be combined — echo the specific requesting origin instead and add Vary: Origin.
An automatic OPTIONS request the browser sends before anything that is not a simple GET or POST. If your server does not answer it with the right headers, the real request is never sent at all.
Because only a handful are exposed by default. Any other header must be named in Access-Control-Expose-Headers, or it arrives but stays invisible to your code.
No. It restricts what a browser lets one site do to another. curl, a server and a mobile app ignore it entirely. Authentication and authorisation are what protect an API.
What people who use the CORS Header Generator think of it. Reviews come from visitors and are posted as written.
No ratings yet
Yours would be the first.
0 reviews
Newest first
No reviews yet
Be the first to rate the CORS Header Generator. It takes half a minute and no account.
Write the first reviewWork out a subnet: network, broadcast, host range and usable count.
Re-indent a stylesheet, or strip it back to one line.
Convert between px, rem, em, pt, %, vw and vh with the right context.
Your screen size, viewport, pixel ratio and which breakpoint is active.
Generate deterministic UUIDs from a namespace and a name.
Build soft extruded UI with paired light and dark shadows.
Parse Set-Cookie and Cookie headers, and check the security flags.
Press any key and see event.key, event.code and the modifier state.