fix(api): route tenants through origin gateway
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

This commit is contained in:
2026-08-20 14:23:12 +04:00
parent bbf12cad33
commit f4ea4c7af8
18 changed files with 241 additions and 69 deletions

View File

@@ -87,6 +87,16 @@ server {
proxy_read_timeout 60s;
}
location /backend/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
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-Proto \$scheme;
proxy_read_timeout 60s;
}
location / {
try_files \$uri \$uri/ /index.html;
}

View File

@@ -104,6 +104,18 @@ server {
proxy_read_timeout 60s;
}
# One same-origin gateway for bootstrap, auth, legacy and versioned APIs.
# The trailing slash removes /backend/ before forwarding upstream.
location /backend/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
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-Proto $scheme;
proxy_read_timeout 60s;
}
# SPA fallback. Must stay last: every unmatched path is a client route.
location / {
try_files $uri $uri/ /index.html;

View File

@@ -119,6 +119,14 @@ server {
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
location /backend/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
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-Proto \$scheme;
}
location / { try_files \$uri \$uri/ /index.html; }
add_header Strict-Transport-Security "max-age=31536000" always;

View File

@@ -150,6 +150,14 @@ server {
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto \$scheme;
}
location /backend/ {
proxy_pass http://127.0.0.1:8080/;
proxy_http_version 1.1;
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-Proto \$scheme;
}
location / { try_files \$uri \$uri/ /index.html; }
add_header X-Content-Type-Options "nosniff" always;