Mercurial > prosody-modules
diff mod_candy/mod_candy.lua @ 1384:f67eacb1ac9f
mod_candy: Redirect from /candy -> /candy/
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 11 Apr 2014 14:58:44 +0200 |
parents | 6b34cc81e15d |
children | 991a5f74f848 |
line wrap: on
line diff
--- a/mod_candy/mod_candy.lua Thu Apr 10 22:40:11 2014 +0200 +++ b/mod_candy/mod_candy.lua Fri Apr 11 14:58:44 2014 +0200 @@ -23,6 +23,10 @@ })); end; ["GET /*"] = serve(module:get_directory().."/www_files"); + GET = function(event) + event.response.headers.location = event.request.path.."/"; + return 301; + end; } });