From a56f08df40867d0faf3fae2491d7f2e6d3dbfa21 Mon Sep 17 00:00:00 2001 From: John Regan Date: Wed, 23 Dec 2020 23:10:37 -0500 Subject: [PATCH] client: default to port 443 for wss urls fixes issue #21 --- lib/resty/websocket/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/resty/websocket/client.lua b/lib/resty/websocket/client.lua index 067b2a5..0157aaf 100644 --- a/lib/resty/websocket/client.lua +++ b/lib/resty/websocket/client.lua @@ -91,7 +91,7 @@ function _M.connect(self, uri, opts) -- ngx.say("port: ", port) if not port then - port = 80 + port = scheme == 'wss' and 443 or 80 end if path == "" then