equal
deleted
inserted
replaced
133 function module.add_host(module) |
133 function module.add_host(module) |
134 module:depends("http"); |
134 module:depends("http"); |
135 module:provides("http", { |
135 module:provides("http", { |
136 name = "admin"; |
136 name = "admin"; |
137 route = { |
137 route = { |
138 ["/"] = function(event) |
138 ["GET"] = function(event) |
139 event.response.headers.location = event.request.path .. "/"; |
139 event.response.headers.location = event.request.path .. "/"; |
140 return 301; |
140 return 301; |
141 end; |
141 end; |
142 ["/*"] = serve_file; |
142 ["GET /*"] = serve_file; |
143 } |
143 } |
144 }); |
144 }); |
145 end |
145 end |
146 |
146 |
147 prosody.events.add_handler("server-started", function () |
147 prosody.events.add_handler("server-started", function () |