Description:
There are use cases where it is desirable for an HTTP proxy to return a configured HTTP response without proxying to an upstream server.
Some examples:
- If path ==
/some_health_check_endpoint, return a 200.
- If path ==
/some_invalid_url_that_clients_are_requesting_nonstop, return a 404 directly to shield the upstream from overload.
Proposed configuration model:
- Add a new action type,
DirectResponseAction, that can be used in place of RouteAction and RedirectAction.
- Let the DirectResponseAction config specify the HTTP response status, an optional reason string, an optional content-type, and an optional response body.
Description:
There are use cases where it is desirable for an HTTP proxy to return a configured HTTP response without proxying to an upstream server.
Some examples:
/some_health_check_endpoint, return a 200./some_invalid_url_that_clients_are_requesting_nonstop, return a 404 directly to shield the upstream from overload.Proposed configuration model:
DirectResponseAction, that can be used in place ofRouteActionandRedirectAction.