Rewrite All Links On Reverse Proxied Page
I'm reverse proxying to a IP restricted page like this: server { server_name mypage.com; listen 80 ; location / { proxy_pass https://sandbox.otherpage.com/;
Solution 1:
You can use sub filters to do what you want
location / {
proxy_pass https://sandbox.otherpage.com/;
proxy_bind $server_addr;
sub_filter "https://sandbox.otherpage.com/""https://myserver.com/";
sub_filter_once off;
sub_filter_types *;
}
You can get rid of the sub_filter_types
if you only need to match html files.
Also you might need to add proxy_set_header Accept-Encoding ""
.
Post a Comment for "Rewrite All Links On Reverse Proxied Page"