My web app uses websockets to communicate between frontend SPA and Micronaut backend. Everything has been working fine but now I am trying to move everything to use TLS.
I deployed a certificate on the backend and if I understand the docs correctly, I should be able to just use wss:// from the frontend to connect and everything should work fine.
However, the connection fails without any useful error in the browser. Firefox gives me a NS_ERROR_NET_RESET. When I try to connect via npx wscat -c wss://api.shitchat.app:80/ws/socket
I get error: write EPROTO 40B89CFD01000000:error:0A0000C6:SSL routines:tls_get_more_records:packet length too long:ssl/record/methods/tls_common.c:663:
which the Internet seems to think indicates that I am connecting to http via https. When I use ws://
everything works.
The TLS should terminate at the fly proxy without me doing anything, correct?
The section about ports from my .toml incase it helps:
[[services]]
internal_port = 8080
protocol = "tcp"
[services.concurrency]
hard_limit = 100
soft_limit = 90
[[services.ports]]
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = "443"
[[services.tcp_checks]]
interval = 10000
timeout = 2000