Describe the problem/error/question
On Ubuntu with docker, i’m using a trasversal Traefik.
It’s working fine with N8N 1.82.1, but when i update it to 1.118.0, i can login, but after, i have Connection lost at top page, and when i execute a workflow, i have the error “Lost connection to the server“.
What is the error message (if any)?
In console:
Firefox can’t establish a connection to the server at ….com/rest/push?pushRef=gbl…x7.
Cookie “dmn_chk_01…2666” has been rejected for invalid domain
Failed to fetch sessions metadata: ResponseError: Plan lacks license for this feature
In container log:
ValidationError: The ‘X-Forwarded-For’ header is set but the Express ‘trust proxy’ setting is false (default). This could indicate a misconfiguration which would prevent express-rate-limit from accurately identifying users. ….
at Object.xForwardedForHeader (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:187:13)
at Object.wrappedValidations. [as xForwardedForHeader] (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:398:22)
at Object.keyGenerator (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:671:20)
at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:724:32
at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected][email protected]/node_modules/express-rate-limit/dist/index.cjs:704:5 {
code: ‘ERR_ERL_UNEXPECTED_X_FORWARDED_FOR’,
help: ‘…-limit.github.io/ERR_ERL_UNEXPECTED_X_FORWARDED_FOR/’
}
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
at Layer.handleRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/lib/layer.js:152:17)
at trimPrefix (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:342:13)
at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:297:9
at processParams (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:582:12)
at next (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/[email protected]/node_modules/router/index.js:291:5)
at /usr/local/lib/node_modules/n8n/src/auth/auth.service.ts:123:18
Docker
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
-
“127.0.0.1:5678:5678”
labels: -
traefik.enable=true
-
traefik.http.routers.n8n.rule=Host(
mon.domain.com) -
traefik.http.routers.n8n.tls=true
-
traefik.http.routers.n8n.entrypoints=web,websecure
-
traefik.http.routers.n8n.tls.certresolver=mytlschallenge
-
traefik.http.middlewares.n8n.headers.SSLRedirect=true
-
traefik.http.middlewares.n8n.headers.STSSeconds=315360000
-
traefik.http.middlewares.n8n.headers.browserXSSFilter=true
-
traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
-
traefik.http.middlewares.n8n.headers.forceSTSHeader=true
-
traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
-
traefik.http.middlewares.n8n.headers.STSPreload=true
-
traefik.http.routers.n8n.middlewares=n8n@docker
-
traefik.http.services.n8n.loadbalancer.server.port=5678
environment: -
N8N_HOST=mon.domain.com
-
N8N_PORT=5678
-
N8N_PROTOCOL=https
-
NODE_ENV=production
-
WEBHOOK_URL=my url
-
GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
-
N8N_PUSH_BACKEND=sse
-
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false
-
N8N_RUNNERS_ENABLED=true
-
TZ=${GENERIC_TIMEZONE}
volumes: -
n8n_data:/home/node/.n8n
-
/local-files:/files
networks: -
traefik-net
volumes:
traefik_data:
external: true
n8n_data:
external: true
networks:
traefik-net:
external: true