Mercurial Hosting > linkmystyle
comparison 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 |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:8f4df159f06b |
|---|---|
| 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 |
