From c4ac778a24058da7d113e5fd5d0b803c2561d1c2 Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Thu, 19 Aug 2021 01:54:08 +0200 Subject: [PATCH] Update nginx conf --- compose.yml | 2 +- nginx.conf | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/compose.yml b/compose.yml index 552d633..985c898 100644 --- a/compose.yml +++ b/compose.yml @@ -6,7 +6,7 @@ services: image: "nginx:stable" configs: - source: abra_conf - target: /etc/nginx/conf.d/abra.conf + target: /etc/nginx/conf.d/default.conf - source: abra_apps_json target: /var/www/abra-apps/apps.json volumes: diff --git a/nginx.conf b/nginx.conf index ec54077..4990377 100644 --- a/nginx.conf +++ b/nginx.conf @@ -3,10 +3,6 @@ server { server_name apps.coopcloud.tech; location / { - root /var/www/abra-apps; - add_header Content-Type application/json; - index apps.json; - if ($request_method = 'OPTIONS') { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; @@ -34,5 +30,10 @@ server { add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always; add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always; } + + add_header Content-Type application/json; + + root /var/www/abra-apps; + index apps.json; } }