title: Nginx proxy/sub_filter css output not being changed
body: <p>I'm currently setting up a reverse proxy using nginx which for the most part is working perfectly.</p>
  
  <p>The conf file has the following entry:</p>
  
  <pre><code>server {
      listen proxy.com default_server;
  
  location  /example.com/ {
  proxy_set_header Accept-Encoding "";
  proxy_set_header Host example.com;
  proxy_pass https://1.2.3.4/;
  sub_filter_types text/html text/css text/javascript;
  sub_filter "http://example.com/" "http://proxy.com/example.com/";
  sub_filter_once off;
  }
  }
  </code></pre>
  
  <p>The proxy is successfully sending back the page and serving elements from the correct proxy locations, however this is where the problem begins.</p>
  
  <p>The style-sheet (<a href="http://proxy.com/example.com/css/style.css" rel="nofollow noreferrer">http://proxy.com/example.com/css/style.css</a>) loads perfectly through the proxy, but inside that, there is a style import line as follows: </p>
  
  <pre><code>@import "http://example.com/css/fonts/entypo.css";
  </code></pre>
  
  <p>As you can see, the domain is not being filterd/changed by the sub_filter at all inside the CSS file.</p>
  
  <p>I have tried changing sub_filter types to the following with no luck:</p>
  
  <pre><code>sub_filter_types *;
  </code></pre>
  
  <p>Should the filter be changing the domain in the CSS file? </p>
  
  <p>If so, is there something I am doing wrong?</p>
  
  <p>Thank you in advance!</p>