Documentation

Policies Reference

Terminate

Description

The Terminate policy skips all the successive policies in a pipeline and responds to the current request with a specified status code and message

Usage

To enable the terminate policy, add terminate in gateway.config.yml in the policies section.


policies:
  - terminate

Example


pipelines:
  api:
    policies:
      terminate:

Options Reference

  • statusCode: Status code to return in the response. Defaults to 400
  • message: String body to return in the response. Defaults to Terminated