diff --git a/3002-apps-static.conf b/3002-apps-static.conf index 65d474a..e069802 100644 --- a/3002-apps-static.conf +++ b/3002-apps-static.conf @@ -13,6 +13,14 @@ server { alias "$appsRoot/uds-middle/dist/"; } + location /api { + 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'; + proxy_pass http://backend; + } + location /static/ { add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';