configure SNI hostname when connecting WSS (#128)

When connecting to WebSocket via TLS, certain servers require hostname
to be sent as part of SNI extension. This was done when using `news`
backend, but not when using `nim-websock` backend. Aligned both impls.
This commit is contained in:
Etan Kissling 2022-09-16 21:38:37 +02:00 committed by GitHub
parent 7b2ed397d6
commit 2424f2b215
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -236,6 +236,7 @@ proc connect*(
return WebSocket.connect(
host = uri.hostname & ":" & uri.port,
path = uri.path,
hostName = uri.hostname,
protocols = protocols,
factories = factories,
hooks = hooks,