Fix resolve hostname

This commit is contained in:
Nicolo Maio 2023-09-12 12:48:01 +02:00
parent be833efbd1
commit 6fa18515d0

View file

@ -33,6 +33,13 @@ if string.find(hostname, '://') then
end
end
if string.find(hostname, '/') then
-- Looks like an URI, strip the scheme
local uri_info = string.split(hostname, "/")
hostname = uri_info[1]
end
if string.find(hostname, ':') then
local host_port_info = string.split(hostname, ":")
if #host_port_info == 2 then