Skip to main content

Parameters

See plugin common configurations for configuration options available to all plugins.

  • status_code

    integer


    vaild vaule:

    between 200 and 598 inclusive


    New HTTP status code in the response.

  • body

    string


    New response body. The Content-Length header would also be reset. Should not be configured with filters.

  • body_base64

    boolean


    default: false


    If true, decode the response body configured in body before sending to client, which is useful for image and protobuf decoding. Note that this configuration cannot be used to decode upstream response.

  • headers

    object


    Actions are executed in the order of add, remove, and set.

    • add

      array


      Headers to append to requests. If a header already present in the request, the header value will be appended. Header value could be set to a constant, or one or more built-in variables.

    • set

      object


      Headers to set to requests. If a header already present in the request, the header value will be overwritten. Header value could be set to a constant, or one or more built-in variables.

    • remove

      array


      Headers to remove from requests.

  • vars

    array[array]


    An array of one or more matching conditions in the form of APISIX expressions to conditionally execute the plugin.

  • filters

    array[object]


    List of filters that modify the response body by replacing one specified string with another. Should not be configured with body.

    • regex

      string


      required


      RegEx pattern to match on the response body.

    • scope

      string


      default: once


      vaild vaule:

      once or global


      Scope of substitution. once substitutes the first matched instance and global substitutes globally.

    • replace

      string


      required


      Content to substitute with.

    • options

      string


      required


      default: jo


      RegEx options to control how the match operation should be performed. See Lua NGINX module for the available options.


API7.ai Logo

API Management for Modern Architectures with Edge, API Gateway, Kubernetes, and Service Mesh.

Product

API7 Cloud

SOC2 Type IIISO 27001HIPAAGDPRRed Herring

Copyright © APISEVEN PTE. LTD 2019 – 2024. Apache, Apache APISIX, APISIX, and associated open source project names are trademarks of the

Apache Software Foundation