From e819d9560a92f8d42d0bff372369a0db480f4206 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 16 May 2022 21:57:08 -0500 Subject: [PATCH] Mastodon nginx: fix CORS on /instance --- installation/mastodon.conf | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/installation/mastodon.conf b/installation/mastodon.conf index 880555003..33b2bd894 100644 --- a/installation/mastodon.conf +++ b/installation/mastodon.conf @@ -104,6 +104,11 @@ server { # Enable CORS so we can fetch them. location /instance { add_header Access-Control-Allow-Origin "*"; + + if ($request_method = 'OPTIONS') { + add_header Access-Control-Allow-Origin "*"; + return 204; + } } # Soapbox ServiceWorker.