possibility to set external url as https

This commit is contained in:
lookshe 2018-01-29 12:04:01 +01:00
parent a46124c178
commit f9b6dfabdc

View file

@ -15,8 +15,9 @@ local xmpp_server_key = module:get_option("http_upload_external_server_key");
local filetransfer_manager_ui_url = module:get_option("filetransfer_manager_ui_url");
-- imports
require"https";
local st = require"util.stanza";
local http = require"socket.http";
local http = (string.len(url) >= 5 and string.sub(url,1,5) == "https") and require"ssl.https" or require"socket.http";
local json = require"util.json";
local dataform = require "util.dataforms".new;
local ltn12 = require"ltn12";