Replace String in Response Body Policy
Replace a string in the incoming request body
Configuration
{
"name": "my-replace-string-outbound-policy",
"policyType": "replace-string-outbound",
"handler": {
"export": "ReplaceStringOutboundPolicy",
"module": "$import(@zuplo/runtime)",
"options": {
"mode": "regexp",
"match": "https://example.com/api/(v1|v0)/",
"replaceWith": "https://my-gateway.com/v1/"
}
}
}
Read more about how policies work