diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-06-23 15:58:56 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-06-23 15:58:56 +0100 |
commit | f00a5d70b30b132b763b2e20c68accb8ce52789d (patch) | |
tree | 0741204836fedee0caea15f4607bd996d7e5fdab /plugins/mod_httpserver.lua | |
parent | 3f141a44c2b4564e5d88748f76f53f5fec6c1a33 (diff) | |
parent | 54bbd9c98aa6e40463982ec2a92fa9a444704b43 (diff) | |
download | prosody-f00a5d70b30b132b763b2e20c68accb8ce52789d.tar.gz prosody-f00a5d70b30b132b763b2e20c68accb8ce52789d.zip |
Automated merge with http://waqas.ath.cx:8000/
Diffstat (limited to 'plugins/mod_httpserver.lua')
-rw-r--r-- | plugins/mod_httpserver.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 2bcdab43..ec22a4bf 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -19,4 +19,15 @@ local function handle_request(method, body, request) return data; end -httpserver.new{ port = 5280, base = "files", handler = handle_request, ssl = false}
\ No newline at end of file +local ports = config.get(module.host, "core", "http_ports") or { 5280 }; +for _, options in ipairs(ports) do + local port, base, ssl, interface = 5280, "files", false, nil; + if type(options) == "number" then + port = options; + elseif type(options) == "table" then + port, base, ssl, interface = options.port or 5280, options.path or "files", options.ssl or false, options.interface; + elseif type(options) == "string" then + base = options; + end + httpserver.new{ port = port, base = base, handler = handle_request, ssl = ssl } +end |