From b52b008f89e05923ce39343fb6f7b4896295df5f Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Fri, 17 Feb 2023 11:51:48 +0200 Subject: [PATCH] enable cors for media dir (#701) --- deploy/docker/nginx_http_only.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/deploy/docker/nginx_http_only.conf b/deploy/docker/nginx_http_only.conf index 47976c1..44294c5 100644 --- a/deploy/docker/nginx_http_only.conf +++ b/deploy/docker/nginx_http_only.conf @@ -16,6 +16,10 @@ server { location /media { alias /home/mediacms.io/mediacms/media_files ; + add_header 'Access-Control-Allow-Origin' '*'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range'; } location / {