diff --git a/docker/nginx/staging.conf b/docker/nginx/staging.conf index f9c39ac..cfdaea3 100644 --- a/docker/nginx/staging.conf +++ b/docker/nginx/staging.conf @@ -12,13 +12,6 @@ server { client_max_body_size 20M; - # CORS für Assets - add_header Access-Control-Allow-Origin "*" always; - add_header Access-Control-Allow-Methods - "GET, POST, OPTIONS" always; - add_header Access-Control-Allow-Headers - "Origin, Content-Type, Accept" always; - access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; @@ -31,6 +24,16 @@ server { try_files $uri $uri/ /index.php?$query_string; } + location ^~ /build/ { + add_header Access-Control-Allow-Origin "*" always; + add_header Access-Control-Allow-Methods + "GET, OPTIONS" always; + add_header Access-Control-Allow-Headers + "Origin, Content-Type, Accept" always; + try_files $uri =404; + } + + # PHP Handling location ~ \.php$ { try_files $uri =404;