Reinis Rozitis
February 05, 2020 10:14AM
> While the AJAX request does not know anything about the NGINX Proxy, they does not know anything about the “webui” path. So I need to find a solution to manipulate these javascript code:

If the javascript files are proxied the same way (from origin server) as the application you can use the same sub_filter approach, just you have to tune the sub_filter_types ( ) to include javascript (by default only 'text/html' is processed).

So something like (depending on what content type your upstream sends for js files):

sub_filter_types text/html text/js text/css application/javascript text/javascript;

p.s. note also that sub_filter module doesn't support compressed content so the upstream server shouldn't gzip/deflate the responses.


nginx mailing list
Subject Author Posted

Adjust ajax urls

Anonymous User February 05, 2020 08:14AM

RE: Adjust ajax urls

Reinis Rozitis February 05, 2020 10:14AM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 86
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready