module "luci.lucid.http.DirectoryPublisher"
+--- Prepare a directory publisher and assign it to a given Virtual Host.
+-- @param server HTTP daemon object
+-- @param config publisher configuration
function factory(server, config)
config.domain = config.domain or ""
local vhost = server:get_vhosts()[config.domain]
vhost:set_handler(v, handler)
end
else
- vhost:set_handler(config.virtual, handler)
+ vhost:set_handler(config.virtual or "", handler)
end
-end
\ No newline at end of file
+end