Allowed origins

Type a domain and press Enter to add it.
A top-level domain (e.g. ropean.org) automatically matches that domain and all its subdomains; a subdomain (e.g. mis.ropean.org) matches exactly.

Top-level domain (includes all subdomains)
Subdomain (exact match only)
Allowed HTTP methods all selected by default
Allowed request headers all selected by default
Allow-Credentials
Allow cross-origin requests to carry Cookie / Authorization
Preflight cache duration
hours
= 86,400 seconds

How long the browser caches the OPTIONS preflight result, reducing repeated requests. Set to 0 to disable caching.

Generate comments
Add explanatory comments to the generated config
Prerequisite: the config below requires OpenResty (with built-in LuaJIT). Standard Nginx does not support the header_filter_by_lua_block and rewrite_by_lua_blockdirectives. Paste the two generated blocks inside your server { } block.
Generated Lua config blocks
Configure options, then click Generate config

OpenResty CORS Generator

Generate CORS config snippets for OpenResty and Nginx.