backend on /api

This commit is contained in:
Primakov Alexandr Alexandrovich 2021-06-06 20:16:07 +03:00
parent 2ad09ae7bd
commit b1166f6bf4

View File

@ -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';