I am trying nginx subfilter module as shown below. I am routing the traffic to reactjs.org and making dynamic text replacements using nginx sub_filter module. The below nginx configuration is not working on any react based websites where I change the text 'React' to 'Test'. How do I overcome this?
location / {
proxy_pass https://reactjs.org;
sub_filter '<h1 class="css-159p4b7">React</h1>' '<h1 class="css-159p4b7">Test</h1>';
sub_filter_once off;
}