Hi Everyone,
I'm testing Nginx as revrproxy for one of the application. One of the requirement is to replace the domain string. I was able to achieve this using sub_filter_types but the Iframes from the page still contains actual domain where our application is running.
Example:
Users will be using abc.com but actual application is running on xyz.com. When users hit abc.com the login and rest of the stuff works as expected but iframes still showing xyz.com.
Nginx Config:
server {
listen [::]:10000 ssl;
server_name abc.com;
root /usr/share/nginx/html;
proxy_redirect https://xyz.com/ $scheme://abc.com/;
sub_filter_types *;
sub_filter xyz.com abc.com;
sub_filter_once off;
location / {
proxy_pass https://xyz.com;
proxy_set_header Host xyz.com;
}
}
I have tried without "sub_filter_types *;" but issue still exist. Does iframes part of sub_filter_types? How can I address this?
Any help is appreciated. Thanks