Matches a request based on criteria matching a JSON body
Matches a request based on one or more cookie values. Keys are case-sensitive cookie names, values are regular expressions to match or null. When value is null then requests are matched for the cookie not being present.
Matches a request based on one or more header values. Keys are case-insensitive header names, values are regular expressions to match or null. When value is null then requests are matched for the header not being present.
Matches a request based on the HTTP method. Instead of this, prefer using
get
, post
, put
, delete
, options
, and patch
methods.
Matches a request based on the path. The same path syntax is used by
the simple form of the Router class's match
method.
Matches a request based on its protocol. Unless explicitly specified then https
is the default. To serve a route on both HTTPS and HTTP you can specify /https?/
regex. If an HTTP request is not matched against any route, Layer0 will
automatically issue a redirect to equivalent HTTPS URL.
Matches a request based on one or more query parameter values. Keys are case-sensitive names, values are regular expressions to match or null. When value is null then requests are matched for the query parameter not being present.
Matches a request response. This is used by error pages to make edge aware of a matching error route. This will issue a restart on a edge with specific header that matches the error route on next eval.
Generated using TypeDoc
Criteria for matching a request.