Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Re: X-Accel-Redirect - showing instead force-download

$
0
0
My problem was in the nxing settings: i was needed to proxy meteor with nginx, but i did not. So now it looks like:

server {
listen %IP%:8080;
server_name localhost;
charset utf-8;

client_max_body_size 75M;

location /internal {
internal;
alias /webapp/.internal;
break;
}

location / {
proxy_pass http://127.0.0.1:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # websocket header
proxy_set_header Connection "upgrade"; # websocket header
}
}

if u need to download the file in the browser tab - add res.setHeader('Content-Disposition', 'attachment; filename=designGuide.pdf'); else(preview) - don't.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>