Caddy v2 CORS settings

Do you have some best practice change header

Access-Control-Allow-Origin

Based on Host header? Article Setup CORS in Caddy 2 not actual for v2.64