robin/maivi

a tiny cute lua web framework

git clone https://git.robinwobin.dev/robin/maivi

robindocs: meow1be4c9c

push-srxvuswpkqxx
202 B6 linesraw
1maivi.hook("handle", { path = "/" }, function(ctx)
2  local useragent = ctx.request.headers["User-Agent"]
3  if string.match(useragent, "^curl") then
4    return ctx:redirect("/index.txt", nil)
5  end
6end)