Welcome! Log In Create A New Profile

Advanced

RE: Adjust ajax urls

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 (http://nginx.org/en/docs/http/ngx_http_sub_module.html#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.


rr

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
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: 194
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready