From 120dcd3d20489bcb0549dc8e401726a489c3827f Mon Sep 17 00:00:00 2001 From: usmannasir Date: Sat, 8 Nov 2025 00:32:16 +0500 Subject: [PATCH] Fix n8n proxy configuration for OpenLiteSpeed compatibility - Change N8N_HOST to 0.0.0.0 (internal bind address, not domain) - Simplify VHost extraHeaders to ONLY set Origin header - Remove duplicate X-Forwarded-* headers (OLS adds these automatically) - Remove N8N_ALLOWED_ORIGINS and N8N_ALLOW_CONNECTIONS_FROM (not needed) The key issue was duplicate X-Forwarded-Host headers. OpenLiteSpeed proxy contexts automatically add X-Forwarded-* headers, so explicitly setting them creates duplicates that cause n8n validation to fail. Only the Origin header needs explicit configuration in extraHeaders. This works with the patched OLS binary (MD5: b9c65aa2563778975d0d2361494e9d31) that forwards Origin headers from the client. --- plogical/DockerSites.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/plogical/DockerSites.py b/plogical/DockerSites.py index e0aefeee1..820e9fcda 100644 --- a/plogical/DockerSites.py +++ b/plogical/DockerSites.py @@ -308,7 +308,9 @@ extprocessor docker{port} {{ logging.writeToFile("Context already exists, skipping...") return True - # Add proxy context with proper headers for n8n + # Add proxy context with Origin header for n8n + # Note: OLS proxy automatically adds X-Forwarded-* headers + # Only Origin header needs explicit configuration proxy_context = f''' # N8N Proxy Configuration @@ -319,11 +321,7 @@ context / {{ websocket 1 extraHeaders <<