I have https working with certificates for my domain, services are LAN only. I have a Shelly smart relay that has a web admin interface at its ip address. I am trying to create a local DNS record for it so I can use SSL for when I access it. I set it up like my other local DNS records, but the interface never loads because it has this error in the web development console:
SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
I think this is because traefik is not redirecting ws to wss. In searching for a solution I couldn't find anything other than that traefik should handle ws like http, and that no additional configuration should be required.
My traefik.yml entry points:
entryPoints:
http:
address: ":80"
http:
redirections:
entryPoint:
to: https
scheme: https
https:
address: ":443"
and my routes and services:
http:
#region routers
routers:
shelly-garage-pro2:
entryPoints:
- "https"
rule: "Host(`garage-pro2-shelly.home.mydomain.top`)"
middlewares:
- default-headers
- https-redirectscheme
tls: {}
service: shelly-garage-pro2
services:
shelly-garage-pro2:
loadBalancer:
servers:
- url: "http://10.0.2.230"
passHostHeader: true
and middleware:
middlewares:
https-redirectscheme:
redirectScheme:
scheme: https
permanent: true
default-headers:
headers:
frameDeny: true
browserXssFilter: true
contentTypeNosniff: true
forceSTSHeader: true
stsIncludeSubdomains: true
stsPreload: true
stsSeconds: 15552000
customFrameOptionsValue: SAMEORIGIN
customRequestHeaders:
X-Forwarded-Proto: https
Do I need to add ws and wss entries as well?