mod_tls: Switch to : syntax for connection methods
[prosody.git] / plugins / mod_httpserver.lua
index f1f2150d1f816fb745b516b57573da5d1ebc6d58..545d4faf306496287628708f938917f594e0e0c2 100644 (file)
@@ -12,7 +12,7 @@ local httpserver = require "net.httpserver";
 local open = io.open;
 local t_concat = table.concat;
 
-local http_base = "www_files";
+local http_base = config.get("*", "core", "http_path") or "www_files";
 
 local response_400 = { status = "400 Bad Request", body = "<h1>Bad Request</h1>Sorry, we didn't understand your request :(" };
 local response_404 = { status = "404 Not Found", body = "<h1>Page Not Found</h1>Sorry, we couldn't find what you were looking for :(" };
@@ -58,4 +58,4 @@ end
 
 local ports = config.get(module.host, "core", "http_ports") or { 5280 };
 httpserver.set_default_handler(handle_default_request);
-httpserver.new_from_config(ports, "files", handle_file_request);
+httpserver.new_from_config(ports, handle_file_request, { base = "files" });