Processed online by Toolvito
CORS Tester
Type the address of an API or page and the origin of your site. The tester sends a preflight and a GET as a browser would, from your origin, from an unknown origin and from the null origin, and says whether a browser would allow the request, and why.
How to test CORS
- Type the API address, for example https://api.example.com/v1/items.
- Type the origin of the site that calls it: scheme and host only, such as https://app.example.com.
- Choose the method, the extra request headers your code sends (such as Authorization or Content-Type) and whether the request sends cookies.
- Press Test CORS and read the decision for each origin, with the reasons.
What the result means
- Allowed means a browser on that origin may send the request and read the answer. CORS never stops the request from reaching the server; it stops the page from reading the answer.
- A preflight (OPTIONS) is sent first for methods other than GET, HEAD and POST, and when the request has headers such as Authorization. The server must answer it with 2xx and the right Access-Control-Allow-* headers.
- With cookies (credentials), Access-Control-Allow-Origin must name the origin exactly (not *) and Access-Control-Allow-Credentials must be true.
- A server that repeats any origin it is sent, or allows the origin null, is as open as *; with credentials, that lets any website read your visitors’ data.
Limits
Only GET requests are actually sent. For POST, PUT, PATCH and DELETE only the preflight is tested, so the tester never changes data on the server. The request comes from the Toolvito server with an Origin header, the way a browser sends it; servers that also check cookies or tokens may answer differently to a signed-in browser.