Fix · Caddy
Fix “CORS policy” on Caddy
Never echo back the request Origin. Allow only a fixed list of your own origins, and only send credentials to those.
header Access-Control-Allow-Origin "https://yourapp.com"
Verify the fix
Re-run the CORS policy check after deploying. Test config changes in staging first and keep a rollback: a wrong header can break a site faster than a missing one.
Other stacks: nginx · Apache · Express / Node · Cloudflare