This plugin terminates incoming requests with a specified status code and
message. This can be used to (temporarily) stop traffic on a Service or a Route,
or even block a Consumer. This plugin can also be used for debugging, as described in the echo
parameter.
Once applied, every request (within the configured plugin scope of a Service, Route, Consumer, or global) will be immediately terminated by sending the configured response.
Example Use Cases
- Temporarily disable a Service (e.g. it is under maintenance).
- Temporarily disable a Route (e.g. the rest of the Service is up and running, but a particular endpoint must be disabled).
- Temporarily disable a Consumer (e.g. excessive consumption).
- Block anonymous access with multiple auth plugins in a logical
OR
setup. - Debugging erroneous requests in live systems.