apisix 修改body中的超链接地址
背景:
部分应用在body中跳转到了其他域名,但是其他域名的网络存在内网网隔离,所以需要将返回的域名修改成其他域名;
代码如下
"plugins": {
"response-rewrite": {
"body_base64": false,
"filters": [
{
"options": "jo",
"regex": "aaaa",
"replace": "X-Amzn-Trace-Id-Replace",
"scope": "global"
}
],
"headers": {
"X-Server-balancer_addr": "$balancer_ip:$balancer_port",
"X-Server-id": 3,
"X-Server-status": "on"
},
"vars": [
[
"status",
"==",
200
]
]
}
},
本文来自博客园,作者:Chuan_Chen,转载请注明原文链接:https://www.cnblogs.com/wangcc7/p/18357243