Welcome! Log In Create A New Profile

Advanced

NGINX Proxy pass replace PNG file

Jason Prouty
June 23, 2022 01:02PM
Is it possible to replace an PNG file with a local image
I want to reverse proxy to site and then change the image returned

I have tried the sub_filter setting but nothing changes.


server {
server_name test1.example1.com;

location /{
proxy_ssl_server_name on;
proxy_pass https://test1.example2.com;
sub_filter '<img src="https://test1.example2.com/assets/images/image1..png' '<img src="https://test1.example1.com/image1.png';
sub_filter_once on;
}

I just want to replace the image of the proxied https://test1.example2.com;https://esim.jcius.com/assets/images/powered-by-dark.png
https://test1.example2.com/assets/images/image1.png
with
a new image hosted locally on my nginx


_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

NGINX Proxy pass replace PNG file

Jason Prouty June 23, 2022 01:02PM

Re: NGINX Proxy pass replace PNG file

Ian Hobson June 24, 2022 12:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
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