Feature Request: Env var to disable origin check on /rest/push (Cloud Run, Render, managed platforms)

n8n v1.87+ introduced a strict origin check on the /rest/push endpoint (push/index.ts:143). When running on managed platforms like Google Cloud Run or Render, the load balancer strips the Origin header before it reaches the container. n8n sees undefined, rejects the connection, and the editor permanently shows “Connection lost.”

Logs:

Origin header does NOT match the expected origin. 
(Origin: "undefined" -> "N/A", Expected: "undefined" -> "undefined")
ResponseError: Invalid origin!

What I’ve tried (none work):

  • N8N_PUSH_BACKEND=sse

  • N8N_PROXY_HOPS=1

  • N8N_EDITOR_BASE_URL=https://<my-url>.run.app

  • N8N_HOST=<my-url>.run.app

  • N8N_PROTOCOL=https

  • N8N_CORS_ORIGIN=*

  • N8N_ENDPOINT_HEALTH=health (fixed the separate /healthz conflict but not this)

On platforms like these, there’s no nginx or Apache to inject an Origin header — you only have env vars.

My workaround

The official n8nio/n8n Docker images currently have corrupted layers (invalid tar header on pull), so I built a custom image from node:20-slim:

FROM node:20-slim
RUN npm install -g [email protected]
RUN sed -i 's/throw new ResponseError("Invalid origin!")/\/\/ patched/' \
    /usr/local/lib/node_modules/n8n/dist/push/index.js
EXPOSE 5678
CMD ["n8n", "start"]

This works, but it’s fragile — any refactor to that line breaks the patch on upgrade.

Request

An env var like N8N_SKIP_ORIGIN_CHECK=true would permanently solve this for everyone deploying on managed platforms. This affects Cloud Run, Render, and likely any platform where users can only configure env vars and can’t control load balancer headers.

Related issues: #21755, #18872, #17477, #14653