Mercurial Hosting > linkmystyle
annotate redir/src/init.luan @ 4:f455bb813e2e default tip
remove facebook ads
| author | Franklin Schmidt <fschmidt@gmail.com> |
|---|---|
| date | Thu, 06 Nov 2025 07:41:24 -0700 |
| parents | 8f4df159f06b |
| children |
| rev | line source |
|---|---|
| 0 | 1 local Http = require "luan:http/Http.luan" |
| 2 local Hosted = require "luan:host/Hosted.luan" | |
| 3 local Logging = require "luan:logging/Logging.luan" | |
| 4 local logger = Logging.logger "init" | |
| 5 | |
| 6 | |
| 7 Hosted.set_https and Hosted.set_https(Http.domain~=nil) | |
| 8 | |
| 9 function Http.not_found_handler() | |
| 10 Http.response.send_redirect("https://linkmy.style"..Http.request.raw_path) | |
| 11 return true | |
| 12 end | |
| 13 | |
| 14 return true |
