1234567maivi.hook("handle", { path = "/" }, function(ctx) local useragent = ctx.request.headers["User-Agent"] if string.match(useragent, "^curl") then return ctx:redirect("/index.txt", nil) endend)