Hi all,
Can anyone help with how I can specify a domain name rather than an IP
address in the socket connect code below? If I try to specify a domain I
get an error. Also, I guess with the code below, host name verification
would not be done in case of ssl connection. How would I go
about enabling it? Thanks for your help.
local addr = 'xx.xx.xx.xx' -- how can I specify domain name instead of IP
address? if https then -- with ssl connect = socket:connect_ssl(addr, 443)
write_log("connecting via https to endpoint", core.info) else -- without
ssl connect = socket:connect(addr, 80) write_log("connecting via http to
endpoint", core.info) end