xiangtianyu commented on issue #12222: URL: https://github.com/apache/apisix/issues/12222#issuecomment-2915181908
> ``` > plugins: > response-rewrite: > headers: > set: > Location: "$regex_replace($http_location, 'http[s]?://test\\.inner\\.com(/.*)', 'http://$host$1')" > vars: > - ["status", "IN", [301, 302]] > - ["http_location", "exists", true] > ``` It can not perfectly replace "proxy_redirect default", because there're some special cases, such as "proxy pass http://test.inner.com/api", if the redirect url is "http://test.inner.com/xxx" it will not replace host to "xxx.test.com", because "/xxx" and "/api" failed to match. The "response-rewrite" plugin cannot perfectly equal to "proxy_redirect default" -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org