Block requests with an error message

Block requests with a 401 status code and a custom message.

Set up the plugin

Add this section to your declarative configuration file:

_format_version: "3.0"
plugins:
  - name: request-termination
    config:
      status_code: 401
      message: '"Error - Authentication required"'
Copied to clipboard!

Did this doc help?

Something wrong?

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!