Hi guys, my web frontend connects to a websocket served from my backend (SpringBoot app). When I run on local dev setup (without Traefik) everything works fine. The frontend creates a connection to e.g. wss://www.example.com/ws/connect. SpringBoot checks the incoming connect request for same origin. It correctly sees the incoming request for:
scheme: https
port: 443
host: www.example.com
and origin:
scheme: https
port: 443
host: www.example.com
On the live setup, I have the SpringBoot app running behind Traefik, so all http/https traffic goes through Traefik to the app. Now when the websocket connect request comes in, SpringBoot sees request for:
scheme: http
port: 443
host: www.example.com
and origin:
scheme: https
port: 443
host: www.example.com
As you can see, everything is correct except the request scheme, which is http and not https, so the same origin policy fails and the frontend gets a 403 response.
It would seem to me that Traefik is making a mistake here?
Any help would be appreciated.