diff options
author | Steven Barth <steven@midlink.org> | 2009-07-27 12:09:46 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2009-07-27 12:09:46 +0000 |
commit | 17e7f67a7c0bbfa26154005a49faf74b3573ff5d (patch) | |
tree | 4a33f661b689c70d0935cb036685adfd8b76e5a1 /libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua | |
parent | ce98fdd80f549ab72c25c5cd799d4946433e4e2c (diff) |
Add native support for homepages
Diffstat (limited to 'libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua')
-rw-r--r-- | libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua b/libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua index f72b94f41a..92dd7e2cbe 100644 --- a/libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua +++ b/libs/lucid-http/luasrc/lucid/http/LuciWebPublisher.lua @@ -56,11 +56,18 @@ function factory(server, config) end end + local mypath if type(config.virtual) == "table" then for _, v in ipairs(config.virtual) do + mypath = mypath or v vhost:set_handler(v, handler) end else + mypath = config.virtual vhost:set_handler(config.virtual, handler) end + + if config.home then + vhost.default = mypath + end end
\ No newline at end of file |