I am using ngnix to proxy_pass
the request to the app server. I am using the below configuration
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
location / {
proxy_pass http://localhost:9000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /names.json {
proxy_pass http://appserver.com:3000;
}
location /names/ {
proxy_pass http://appserver.com:3000;
}
}
Now I have a POST request in the format: http://uiserver.com/hosts/export.xlsx
I am passing the params for the POST and making a POST request from my web server. Now when the app server returns the data in the form of excel, the browser is not loading with the data in the form of a file instead, I am seeing encrypted data in the response.
Is there something I am missing and how should I fix this? Or is it something form the app server end. Please let me know.
Thanks