Hi Everyone!

We're using nginx as a reverse proxy for a staging system so customers can
view the contents of their directories without a resolving domain.

It's working really well, but the issue is, references to their domain
aren't being filtered inside their CSS or JS files which are also loading
via the proxy URL.

*Currently the configuration of each host is as follows. *

server {
server_name example-com-au.tempexample.com.au;
location / {
proxy_set_header Host real-domain.com;
add_header X-Robots-Tag "noindex, nofollow, nosnippet, noarchive";
proxy_pass http://ip.ip.ip.ip/;
sub_filter_types text/html text/css text/javascript;
proxy_set_header Accept-Encoding "*";
sub_filter "http://real-domain.com/"; "
sub_filter_once off;

Does anybody know if we can further configure a sub_filter so that the
contents of JS and CSS files are also filtered when loaded via the proxy?

It has been very hard finding relevant information, the docs aren't overly
helpful and even stackoverflow hasn't wielded good results.

Thanks in advance!
nginx mailing list

Reply via email to