Defines the default behavior when no specific route matches.
No Additional PropertiesThe URL of the proxy to connect to by default.
"http://default.proxy"
Whether to deny access if no routing matches.
true
The level of logging detail. Possible values are 'DEBUG', 'INFO', 'WARN', or 'ERROR'.
"DEBUG"
If true, eavesdrop all HTTPS access to get the full URL. If false, only eavesdrop HTTP access if the host name matches.
true
Routing settings. Each route defines a URL pattern and the response to return.
No Additional ItemsA single route configuration.
No Additional PropertiesThe URL pattern to match. If this URL matches, the specified response will be returned.
"https://example.com/api"
"https://example.com/user/[^/]+/post/[^/]"
If true, regex can be used for URL matching.
false
The response to return. One of 'rewrite', 'content', or 'file' can be specified.
No Additional PropertiesRewrite settings. Defines how the URL should be rewritten.
No Additional PropertiesThe pattern to be replaced.
"^https://example\\\\.com/user/([^/]+)/post/([^/]+)"
The replacement string.
"https://example.com/api?user=$1&post=$2"
Whether to use regex for matching the 'from' URL.
false
The URL of the proxy to use for this route. If not specified, 'default_route.proxy' will be used. To disable the proxy, specify an empty string.
"http://proxy.example.com"
The destination URL to rewrite.
"https://example.com/api?user=me"
The content to return as the response.
"This is the response content"
"not found"
The MIME type of the content.
"text/plain"
"application/json"
The HTTP status code to return.
200
404
The file path to return as the response.
"/path/to/file"
"sample.png"
Additional headers to include in the response.
{
"Access-Control-Allow-Origin": "*"
}
The command to transform the response content.
"sed -E 's/foo/bar/g'"
"bash ./script.sh"
The path to the SSL certificate file.
"server.crt"
The path to the private key file corresponding to the SSL certificate.
"server.key"