Hi,
I spent two last days fighting with websockets and traefik. Is there anyone who use websockets and traefik as a proxy? My configuration is as follows:
# traefik proxy (only relevant part of proxy)
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
#permanent: true
forwardedHeaders:
insecure: true
https:
address: ":443"
forwardedHeaders:
insecure: true
tls:
options:
default:
minVersion: VersionTLS12
...
And my job deployment labels are:
"public",
"traefik.enable=true",
"traefik.http.routers.${NOMAD_JOB_NAME}-http.rule=Host(`${var.fqdn}`)",
"traefik.http.routers.${NOMAD_JOB_NAME}-http.tls=true",
"traefik.http.middlewares.sslheader.headers.customrequestheaders.X-Forwarded-Proto=https,wss"
In devtools I see only connection failed errors.
I have it deployed via nomad and traefik uses consul as a provider. Everything works fine, when I use directly port exposed by nomad websocket works.