diff --git a/nginx/domains/doh.ffmuc.net.conf b/nginx/domains/doh.ffmuc.net.conf index e6ebe30..1140ffb 100644 --- a/nginx/domains/doh.ffmuc.net.conf +++ b/nginx/domains/doh.ffmuc.net.conf @@ -67,6 +67,12 @@ server { proxy_buffering off; proxy_pass http://$doh_backend/dns-query$is_args$args; proxy_http_version 1.1; + + // Add CORS Header to allow access via JavaScript see: https://github.com/freifunkMUC/ffmuc-salt-public/issues/125 + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET, POST' always; + add_header 'Access-Control-Allow-Headers' '*' always; + # proxy_set_header Connection ""; } location / {