I have Nginx as reverse proxy to a backend server.
While everything works for the most of the time, here I am experiencing JS error “Cannot read properties of undefined”.
When accessing backend directly, of course everything is OK, and as well, when I am access it trough another proxy, that I have no access to, it works that way as well.
I know I did not share a lot of details, configuration is pretty much basic, as per below:
server {
listen 443 ssl;
server_name myproxydomain.com;
ssl_certificate /path/to/your/ssl_certificate.crt;
ssl_certificate_key /path/to/your/ssl_certificate.key;
location / {
proxy_pass https://backenddomain.com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
sub_filter_types *;
sub_filter_once off;
sub_filter 'backenddomain.com' 'myproxydomain.com';
}
}
I have tried various configuration changes, but nothing seems to helped so far. I am hoping to find a solution or at least some clue in the right direction
Milan Najerica is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.