Running n8n on Azure Container Apps (ACA) behind corporate proxy. ACA strips the Origin header before it reaches n8n. n8n 1.87+ checks Origin strictly → “Invalid origin!” error → “Lost Connection” in editor.
Tried: N8N_DISABLE_ORIGIN_CHECK=true, N8N_ALLOWED_ORIGINS=*, N8N_TRUST_PROXY=1, N8N_PROXY_HOPS=1 → none work.
Confirmed with whoami test: ACA strips Origin and X-Forwarded-Host by default.
Now trying nginx reverse proxy in same ACA environment to set Origin header statically before forwarding to n8n. nginx is Running/Ready but ACA returns 404.
Describe the problem/error/question
Origin header does NOT match the expected origin. (Origin: “undefined” → “N/A”, Expected: “undefined” → “undefined”)
ResponseError: Invalid origin!
I would put n8n behind an nginx reverse proxy that becomes the public entrypoint and explicitly forwards/restores Host, X-Forwarded-Host, X-Forwarded-Proto, and Origin headers to n8n, because n8n’s reverse-proxy setup expects those forwarded headers and community reports show proxy_set_header Host $host; plus proxy_set_header Origin $http_origin; resolves the post-1.87 “Invalid origin” editor disconnect issue.
Your nginx sidecar idea is right, the 404 is almost certainly because ACA ingress is still pointing at n8n’s port instead of nginx’s — make sure ingress targets nginx (like port 80) and then nginx proxies to localhost:5678 with proxysetheader Origin https://your-domain; and proxysetheader Host your-domain;.
Has anyone successfully run nginx as a sidecar in the same container as n8n on ACA? nginx fails with getpwnam("nginx") failed because the n8n hardened image has no nginx user. How do you start nginx without the nginx user?"
Just change user nginx; to user root; at the top of your nginx.conf (or remove the user directive entirely), the default nginx config expects an nginx user that doesn’t exist in the n8n image so it chokes on startup.