Mercurial > prosody-hg
comparison plugins/mod_http.lua @ 5180:4ef69555a879
mod_http: Add 'http_host' option to change the HTTP virtual host that this host is accessible at (e.g. allows mapping a host to '127.0.0.1')
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 15 Nov 2012 13:24:10 -0500 |
| parents | bcabea740c00 |
| children | 8461e8ed7c09 |
comparison
equal
deleted
inserted
replaced
| 5179:f3662fea95d9 | 5180:4ef69555a879 |
|---|---|
| 65 end | 65 end |
| 66 end | 66 end |
| 67 end | 67 end |
| 68 | 68 |
| 69 function module.add_host(module) | 69 function module.add_host(module) |
| 70 local host = module.host; | 70 local host = module:get_option_string("http_host", module.host); |
| 71 local apps = {}; | 71 local apps = {}; |
| 72 module.environment.apps = apps; | 72 module.environment.apps = apps; |
| 73 local function http_app_added(event) | 73 local function http_app_added(event) |
| 74 local app_name = event.item.name; | 74 local app_name = event.item.name; |
| 75 local default_app_path = event.item.default_path or "/"..app_name; | 75 local default_app_path = event.item.default_path or "/"..app_name; |
