From ae05001036d92e01f11d271d05c800ce1d3a278e Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Wed, 31 Jul 2019 19:03:25 +0200 Subject: Another attempt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg --- nginx/matrix_kyriasis_com.sls | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'nginx') diff --git a/nginx/matrix_kyriasis_com.sls b/nginx/matrix_kyriasis_com.sls index cec97da..4182830 100644 --- a/nginx/matrix_kyriasis_com.sls +++ b/nginx/matrix_kyriasis_com.sls @@ -61,10 +61,9 @@ nginx: - proxy_buffering: "off" - proxy_set_header: X-Forwarded-For $remote_addr - proxy_set_header: Host $host - - proxy_hide_header: Access-Control-Allow-Origin - - add_header: "'Access-Control-Allow-Origin' '*'" - - proxy_hide_header: Access-Control-Allow-Methods - - add_header: "'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, HEAD, OPTIONS'" + - "if ($sent_http_access_control_allow_origin ~ '')": + - add_header: "'Access-Control-Allow-Origin' '*'" + - add_header: "'Access-Control-Allow-Methods' 'GET, PUT, POST, DELETE, HEAD, OPTIONS'" - location /_synapse: - proxy_pass: http://synapse_metrics -- cgit v1.2.3-70-g09d2