NGINX sub_filter problem

Closed Posted 6 years ago Paid on delivery
Closed Paid on delivery

I'm currently setting up a reverse proxy using nginx which for the most part is working perfectly.

The conf file has the following entry:

server {

listen [url removed, login to view] default_server;

location /[url removed, login to view] {

proxy_set_header Accept-Encoding "";

proxy_set_header Host [url removed, login to view];

proxy_pass https://1.2.3.4/;

sub_filter_types text/html text/css text/javascript;

sub_filter "[url removed, login to view]" "[url removed, login to view]";

sub_filter_once off;

}

}

The proxy is successfully sending back the page and serving elements from the correct proxy locations, however this is where the problem begins.

The style-sheet ([url removed, login to view]) loads perfectly through the proxy, but inside that, there is a style import line as follows:

@import "[url removed, login to view]";

As you can see, the domain is not being filterd/changed by the sub_filter at all inside the CSS file.

I have tried changing sub_filter types to the following with no luck:

sub_filter_types *;

Should the filter be changing the domain in the CSS file?

We need you to use your NGINX expertise to make sure the contents of the CSS file are also being modified by the filter.

CSS Linux Nginx

Project ID: #15816747

About the project

4 proposals Remote project Active 6 years ago

4 freelancers are bidding on average $57 for this job

talhamq

A proposal has not yet been provided

$40 AUD in 1 day
(69 Reviews)
5.3
chiragdosi

Hello, I will help you in all your NGINX related issues. Relevant Skills and Experience Red Hat Certified Linux Engineer having 5+ year of experience in Managing Core Server | Dedicated Server | VPS Server | SSL Certi More

$30 AUD in 1 day
(21 Reviews)
4.6
PradhumanS

Dear Project Owner, I hope you are having an awesome day so far!!! I will help you in resolving the issues related to Nginx. Relevant Skills and Experience 5+ years of experience in Managing Core Server, Dedicated S More

$25 AUD in 1 day
(0 Reviews)
0.0
cnservicios

I can help you to find fix for this problem and make a good configuration for your nginx. Relevant Skills and Experience nginx, webserver, Proposed Milestones $133 AUD - find and fix problem

$133 AUD in 3 days
(0 Reviews)
0.0