mirror of
https://github.com/codex-storage/nim-websock.git
synced 2025-02-09 01:04:19 +00:00
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:
parent
7b2ed397d6
commit
2424f2b215
@ -236,6 +236,7 @@ proc connect*(
|
|||||||
return WebSocket.connect(
|
return WebSocket.connect(
|
||||||
host = uri.hostname & ":" & uri.port,
|
host = uri.hostname & ":" & uri.port,
|
||||||
path = uri.path,
|
path = uri.path,
|
||||||
|
hostName = uri.hostname,
|
||||||
protocols = protocols,
|
protocols = protocols,
|
||||||
factories = factories,
|
factories = factories,
|
||||||
hooks = hooks,
|
hooks = hooks,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user