Urgent.News

What's breaking now, across thousands of outlets.

Tech

n8n "Connection lost" (code=1008) behind a reverse proxy: seven ways the Origin check failed in one 80-comment GitHub thread

After upgrading to n8n 1.88, the editor loads and then says Connection lost . The browser console shows [WebSocketClient] Connection lost, code=1008 . That is the push connection ( /rest/push ) being refused, and the reason is in n8n's log, not the browser: Invalid origin! , or on later versions Origin header does NOT match the expected origin . n8n issue #14653 collected 80 comments between…

When upgrading to n8n version 1.88, users might experience a "Connection lost" error, indicated by a WebSocket push connection refusal. The issue arises because the Origin header in the request does not match the expected origin. The n8n codebase checks for this mismatch and closes the connection with an error code of 1008.

The source material details seven different ways this check can fail, with fixes varying depending on the n8n version and the reverse proxy used. Six of these fixes have been successful for users, though a seventh remains untested since the thread was marked as "not planned" on August 15, 2025.

The discrepancy lies in how n8n compares the browser's Origin header to the expected origin, which can change based on the n8n version and the reverse proxy configuration. Six fixes address this issue, but they each involve sending different header values from the reverse proxy to n8n, such as setting both Host and Origin explicitly, preserving the original Host header, dropping the port number in the Origin header, or configuring a proxy manager like Nginx Proxy Manager or IIS with ARR.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Tuesday 17 November →