Add a request-modification rule
proxy_request_transformIntercept HTTP requests by method and URL, modify headers, query parameters, or body, then forward to the backend and return the response.
Instructions
Intercept a request matching method+URL, modify it (headers, query params, body), forward to the real backend, and return the response. Use setHeaders/removeHeaders to modify headers, setQuery/removeQuery for URL params, and body to replace the request body.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL pattern (glob/substring by default, regex=true for raw regex). | |
| body | No | Replace the request body (for POST/PUT). | |
| regex | No | Treat 'url' as a raw regex (default false). | |
| method | Yes | HTTP method: GET, POST, PUT, DELETE, PATCH, HEAD, or OPTIONS. | |
| setQuery | No | Query params to add or override (e.g. { "include": "extended" }). | |
| setHeaders | No | Headers to add or override (e.g. { "x-custom": "val" }). | |
| removeQuery | No | Query params to strip from the URL (e.g. ["legacy"]). | |
| removeHeaders | No | Headers to strip from the outgoing request (e.g. ["x-newrelic"]). |