improve config, fix request params

This commit is contained in:
2022-08-04 19:46:42 +03:00
parent 8f0c3afe9f
commit 79432c3e06
6 changed files with 95 additions and 6 deletions

View File

@@ -47,12 +47,13 @@ server {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api {
rewrite ^/api/?(.*)$ /$1 break;
proxy_pass http://backend/$1;
location ~* ^/api/(.*)$ {
proxy_redirect off;
proxy_pass http://backend/api/$1$is_args$args;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}
location /files {