From 23fefae3b2b87ed68358133f137d60109ad960c1 Mon Sep 17 00:00:00 2001 From: tengel Date: Thu, 10 Oct 2024 11:46:46 -0500 Subject: [PATCH] add headers on .well-known for CORS access --- etc/nginx/sites-available/xyzzy.fi.conf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/nginx/sites-available/xyzzy.fi.conf b/etc/nginx/sites-available/xyzzy.fi.conf index 134362b..351dc8a 100644 --- a/etc/nginx/sites-available/xyzzy.fi.conf +++ b/etc/nginx/sites-available/xyzzy.fi.conf @@ -6,6 +6,13 @@ server { root /var/xyzzy/html/plugh; index index.html; + location ~ /\.well-known { + allow all; + # Needed for CORS + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET' always; + } + location / { try_files $uri $uri/ =404; } @@ -42,6 +49,9 @@ server { location ~ /\.well-known { allow all; + # Needed for CORS + add_header 'Access-Control-Allow-Origin' '*' always; + add_header 'Access-Control-Allow-Methods' 'GET' always; } location ~ / {