FidgetF
ZITADEL5mo ago
9 replies
Fidget

Login v2 pod not sending CUSTOM_REQUEST_HEADERS

Use-case: Kubernetes self-hosted proof-of-concept
Environment: Self-Hosting on EKS
Version: ghcr.io/zitadel/zitadel:v4.0.0
Stack: Zitadel UI v2
What you expected to happen: Zitadel UI for basic management login
What went wrong: Login v2 gets 400 error due to issue with Host header to zitadel API instance
Attachments:

On the zitadel-login pods I see the environment variable file is set:
cat /.env-file/.env
/.env-file/.env
ZITADEL_SERVICE_USER_TOKEN_FILE="/login-client/pat"
ZITADEL_API_URL="http://zitadel:8080"
CUSTOM_REQUEST_HEADERS="Host:zitadel.example.com"


Testing from the CLI with curl and wget I can send host headers and get a 200 response.
However the pods logs show connection errors experienced when the CUSTOM_REQUEST_HEADERS aren't sent.
ZITADEL_SERVICE_USER_TOKEN_FILE=/login-client/pat is set and file exists, setting ZITADEL_SERVICE_USER_TOKEN to the files content
   ▲ Next.js 15.4.0-canary.86
   - Local:        http://localhost:3000
   - Network:      http://0.0.0.0:3000

Error [ConnectError]: [unavailable] connect ECONNREFUSED 172.20.216.193:8080
    at <unknown> (ConnectError: [unavailable] connect ECONNREFUSED 172.20.216.193:8080)
    at h.from (.next/server/chunks/981.js:9:112772)
    at aB (.next/server/chunks/981.js:9:74614)
    at ClientHttp2Session.h (.next/server/chunks/981.js:9:82106) {
  rawMessage: 'connect ECONNREFUSED 172.20.216.193:8080',
  code: 14,
  metadata: Headers {},
  details: [],
  [cause]: Error: connect ECONNREFUSED 172.20.216.193:8080
      at <unknown> (Error: connect ECONNREFUSED 172.20.216.193:8080) {
    errno: -111,
    code: 'ECONNREFUSED',
    syscall: 'connect',
    address: '172.20.216.193',
    port: 8080
  }
}
Was this page helpful?