Skip to main content
Feedback

URL Rewriting Policy

URL Rewriting policy allows you to rewrite URLs from HTTP response headers and / or HTTP response body.

Timing

On RequestOn ResponseOn Request ContentOn Response Content
XX

Configuration

PropertyRequiredDescriptionTypeDefault
rewriteResponseHeadersnoRewrite the value of HTTP response headers.booleantrue
rewriteResponseBodynoRewrite the HTTP response body.booleantrue
fromRegexyesThe regex pattern for matching URLs.string (regex)true
toReplacementyesThe value used to replace matching URLs (supports EL).stringtrue

Example

"url-rewriting": {
"rewriteResponseHeaders": true,
"rewriteResponseBody": true,
"fromRegex": "https?://[^\/]*\/((.*|\/*))",
"toReplacement": "https://apis.company.io/{#group[1]}"
}
On this Page