Skip to main content

Parameters

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

  • uri

    string


    New upstream URI path. Value could be a built-in variable.

  • method

    string


    vaild vaule:

    GET, POST, PUT, HEAD, DELETE, OPTIONS, MKCOL, COPY, MOVE, PROPFIND, LOCK, UNLOCK, PATCH, or TRACE


    HTTP method to rewrite requests to use.

  • regex_uri

    array[string]


    Regular expressions used to match the URI path from client requests and compose a new upstream URI path. When both uri and regex_uri are configured, uri has a higher priority. The array should contain one or more key-value pairs, with the key being the regular expression to match URI against and value being the new upstream URI path.

    For example, with ["^/iresty/(. *)/(. *)", "/$1-$2", ^/theothers/*", "/theothers"], if a request is originally sent to /iresty/hello/world, the plugin will rewrite the upstream URI path to /iresty/hello-world; if a request is originally sent to /theothers/hello/world, the plugin will rewrite the upstream URI path to /theothers.

  • host

    string


    Set Host request header.

  • headers

    object


    Header actions to be executed. Can be set to objects of action verbs add, remove, and/or set; or an object consisting of headers to be set.

    When multiple action verbs are configured, actions are executed in the order of add, remove, and set.

    • add

      object


      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, one or more built-in variables, or the matched result of regex_uri using variables such as $1-$2-$3.

    • 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, one or more built-in variables, or the matched result of regex_uri using variables such as $1-$2-$3.

      Should not be used to set Host.

    • remove

      array


      Headers to remove from requests.

  • use_real_request_uri_unsafe

    boolean


    default: false


    If true, bypass URI normalization and allow for the full original request URI. Enabling this option is considered unsafe.


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