fix(proxy): strip upstream browser origin
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

nginx owns the validated CORS response; the live :445 backend rejects requests when the browser Origin is forwarded.
This commit is contained in:
2026-08-20 16:29:05 +04:00
parent 9cd56586fb
commit 92f1c884c9
2 changed files with 7 additions and 1 deletions

View File

@@ -72,6 +72,9 @@ server {
proxy_set_header Host \$storefront_host;
proxy_set_header X-Forwarded-Host $API_DOMAIN;
proxy_set_header X-Storefront-Host \$storefront_host;
# nginx has already validated and answered CORS. The existing backend
# rejects browser Origin on :445, so do not forward it a second time.
proxy_set_header Origin "";
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 https;