X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_httpserver.lua;h=a863928148bf33407b80c0c7cd8f31638813a84e;hb=58bf4369711eed604ab2a485f7f957e522a05796;hp=2bcdab43a5564eca710e613b3f028b06dd2da3f9;hpb=38d4ced7cc6adb8e4f029733abfe94f7a5f32591;p=prosody.git diff --git a/plugins/mod_httpserver.lua b/plugins/mod_httpserver.lua index 2bcdab43..a8639281 100644 --- a/plugins/mod_httpserver.lua +++ b/plugins/mod_httpserver.lua @@ -1,3 +1,11 @@ +-- Prosody IM +-- Copyright (C) 2008-2009 Matthew Wild +-- Copyright (C) 2008-2009 Waqas Hussain +-- +-- This project is MIT/X11 licensed. Please see the +-- COPYING file in the source package for more information. +-- + local httpserver = require "net.httpserver"; @@ -19,4 +27,5 @@ 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 }; +httpserver.new_from_config(ports, "files", handle_request);