HomeDeveloper toolsCORS Policy Builder

CORS Policy Builder

Generate CORS headers for one allowed origin and selected request methods.

Processing stays in your browser. Apply these through your server's response handling. CORS is a browser policy, not authentication; wildcard origins cannot be combined with credentialed requests.

How to use the cors policy builder

Generate CORS headers for one allowed origin and selected request methods. Complete the allowed origin or *, allowed methods (comma-separated), allowed headers (comma-separated), allow credentials, preflight max age (seconds) fields above. Choose Run tool, review the output, then copy or download the result.

Example

Allow credentials Yes adds Access-Control-Allow-Credentials: true.

Good to know

Apply these through your server's response handling. CORS is a browser policy, not authentication; wildcard origins cannot be combined with credentialed requests.

Use protocol data with its original context

Copy a small request, response, record or configuration that demonstrates the question you are investigating. Remove credentials, cookies and private hostnames where possible. Preserve line endings, numeric bases and field order when the format requires them. Distinguish a tool that reads pasted data from one that makes an external lookup: reading a sample cannot establish the current state of a remote service.

Inputs and settings explained

Allowed origin or *
Use the address format indicated by the label and example. Include a scheme when a full URL is requested; a hostname, origin and full path are different values. Remove credentials or private query parameters when preparing a reproducible example.
See the demonstration value
https://app.example.com
Allowed methods (comma-separated)
Enter the allowed methods (comma-separated) exactly as required by the example. Check spelling, whitespace and any stated naming rules before running the operation. Use a small test value first; an accepted text field does not by itself establish that the value is appropriate for the system that will consume the result.
See the demonstration value
GET, POST, OPTIONS
Allowed headers (comma-separated)
Enter the allowed headers (comma-separated) exactly as required by the example. Check spelling, whitespace and any stated naming rules before running the operation. Use a small test value first; an accepted text field does not by itself establish that the value is appropriate for the system that will consume the result.
See the demonstration value
Content-Type, Authorization
Allow credentials
Choose the allow credentials setting that matches your task. Available choices: No; Yes. The supplied example selects No. Compare the result after changing this setting; the options describe different operations or conventions.
Preflight max age (seconds)
Enter a numeric value for preflight max age (seconds), using the units and bounds indicated by the label and method notes. The demonstration uses 600. Check signs and scale before calculating; a percentage, fraction and whole-number count have different meanings.
See the demonstration value
600

How to review the result

Compare the reported fields with the relevant protocol and the implementation that will consume them. A valid-looking record can still refer to an unavailable host or an incorrectly configured service. Redirects, caches, proxies and resolver choices can affect what a real client observes. When a lookup is available, note its provider and time, and confirm an important finding from the environment where the failure occurs. Never assume that one observation represents all networks or clients.

  • Check the hostname, port, scheme, record type and request method for the actual task.
  • Keep malformed sample data separate from evidence captured from a live system.
  • Verify the result with the real client or service after applying a configuration change.

Common questions about this workflow

Does a local report show whether my server is reachable?

Only an actual network operation can observe reachability, and that observation is limited to its location and time. A parser or builder can help inspect the supplied data but cannot establish the remote service's behavior.

Why does another machine show a different result?

The machines may use different DNS resolvers, caches, networks, authentication or software versions. Compare their actual requests and configurations. Use the report to narrow the question rather than treating a difference as proof that either machine is wrong.

Built by DevBricks Technologies. Found an unexpected result in CORS Policy Builder? Report a reproducible example with the tool URL, settings and a small sample that contains no private information.