From 61a6ee3ba8a88ce6b2fc3e49e1af2a02231398d8 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Sun, 4 Aug 2024 00:34:39 +0200 Subject: [PATCH] Set the add_header directive for Mastodon --- roles/docker/files/vhost/mastodon | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/docker/files/vhost/mastodon b/roles/docker/files/vhost/mastodon index 61d7db8..33db1c9 100644 --- a/roles/docker/files/vhost/mastodon +++ b/roles/docker/files/vhost/mastodon @@ -1,2 +1,9 @@ listen 3000; client_max_body_size 50M; # default is 1M + +# Mastodon needs to allow all clients to access stuff. +# This can be tweaked to only allow images/videos and certain HTTP methods like +# add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS'; +# add_header 'Access-Control-Allow-Headers' 'Range'; +# add_header 'Accept-Ranges' 'bytes'; +add_header Access-Control-Allow-Origin *;