CORS header helper

CORS header helper

Build Access-Control response headers and a short server snippet.

About this tool

Cross-origin resource sharing is controlled by response headers. The browser checks the allowed origin, methods and request headers before it lets a page read the response.

Fill in the policy to build the matching Access-Control headers, then copy a short snippet for a Worker, nginx or a generic server. This is a header helper, not a proxy or a test of a live site.

Worked example

Allowing https://app.example.com with GET and POST, the Content-Type header, credentials and a max age of 600 gives six response header lines, including Access-Control-Allow-Origin: https://app.example.com.

Common searches