Running n8n on Azure Container Apps (ACA) with HTTPS via ACA Ingress.
Getting “Invalid origin” error when trying to execute workflows manually.
N8N_DISABLE_ORIGIN_CHECK=true has no effect.
Origin is always “undefined” in logs.
Tested from external network (mobile data) - same issue.
Describe the problem/error/question
Running n8n 2.14.2 on Azure Container Apps (ACA) in Switzerland North. n8n is accessible via HTTPS through the ACA Ingress (Port 443 → internal 5678). When trying to manually execute a workflow in the editor, the connection drops immediately with “Lost connection to server”.
In the logs the following error appears repeatedly:
Origin header does NOT match the expected origin. (Origin: “undefined” → “N/A”, Expected: “undefined” → “undefined”, Protocol: “undefined”)
ResponseError: Invalid origin!
All recommended environment variables are set including N8N_DISABLE_ORIGIN_CHECK=true, N8N_TRUST_PROXY=true, N8N_PROXY_HOPS=1, N8N_EDITOR_BASE_URL, N8N_HOST, N8N_PROTOCOL=https, N8N_SECURE_COOKIE=false.
Tested from external network (mobile data, no corporate proxy) — same issue. So it is not a corporate proxy/firewall problem.
N8N_PUSH_BACKEND=sse and websocket both tested — same result.
n8n was previously running stable on Azure Container Instance (ACI) with direct port 5678. After migration to ACA the origin error appeared.
What is the error message (if any)?
Please share your workflow
Not applicable. The issue occurs before any workflow can be executed.
The connection drops immediately when opening any workflow in the editor.
Share the output returned by the last node
Not applicable. No workflow execution reaches completion due to the connection drop.
Log output from Azure Container Apps:
Origin header does NOT match the expected origin. (Origin: “undefined” → “N/A”, Expected: “undefined” → “undefined”, Protocol: “undefined”)
ResponseError: Invalid origin!
at Push.handleRequest (/usr/local/lib/node_modules/n8n/src/push/index.ts:143:10)
at /usr/local/lib/node_modules/n8n/src/push/index.ts:99:10
Information on your n8n setup
- n8n version: 2.14.2
- Database : PostgreSQL
- **Running n8n via :**Docker on Azure Container Apps
- **Operating system:**Linux (container)
- Environment variables:
N8N_PUSH_BACKEND=sse
N8N_PROTOCOL=https
N8N_HOST=ca-n8n-dev.gentlesand-3316a620.switzerlandnorth.azurecontainerapps.io N8N_EDITOR_BASE_URL=https://ca-n8n-dev.gentlesand-3316a620.switzerlandnorth.azurecontainerapps.io
WEBHOOK_URL=https://ca-n8n-dev.gentlesand-3316a620.switzerlandnorth.azurecontainerapps.io
N8N_TRUST_PROXY=true
N8N_PROXY_HOPS=1
N8N_SECURE_COOKIE=false
N8N_DISABLE_ORIGIN_CHECK=true
N8N_ALLOWED_ORIGINS=https://ca-n8n-dev.gentlesand-3316a620.switzerlandnorth.azurecontainerapps.io
N8N_ENCRYPTION_KEY=[set]
DB_TYPE=postgresdb
DB_POSTGRESDB_SSL_ENABLE=true