Mercurial Hosting > linkmystyle
diff unsubscribe/redir/src/init.luan @ 0:8f4df159f06b
start public repo
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Fri, 11 Jul 2025 20:57:49 -0600 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/unsubscribe/redir/src/init.luan Fri Jul 11 20:57:49 2025 -0600 @@ -0,0 +1,14 @@ +local Http = require "luan:http/Http.luan" +local Hosted = require "luan:host/Hosted.luan" +local Logging = require "luan:logging/Logging.luan" +local logger = Logging.logger "init" + + +Hosted.set_https and Hosted.set_https(Http.domain~=nil) + +function Http.not_found_handler() + Http.response.send_redirect("https://unsubscribe.linkmy.style"..Http.request.raw_path) + return true +end + +return true