Skip to content

Recipes

BitK edited this page Jun 9, 2021 · 4 revisions

HTTP to HTTPS redirect

  • First create a new redirectScheme middleware with scheme set to https. middleware

  • Then create a router using that middleware and the noop@redis service, don't forget to put a low priority on this router if you want to use http for some service later. router

DNS Rebinding

Create a LUA A rule that return a random IP from a list, don't forget to put a short TTL.

rebind

Creating a catchall http

If you want to create a router that match all subdomain and a parent you can use this rule

HostRegexp(`example.com`, `{subdomain:.*}.example.com`)

And dont forget to put a low priority

Clone this wiki locally