'I am having problems with my server streaming files from s3
I am trying to stream a (non static) file from my backend. All is working as it should in my local environment, which is I am getting the file to download.
When I try to use the same endpoint on my production environment to stream a file I get a different result. I suspect that the issue has to do with Nginx, but I am not sure.
here is my result from production server:
{"stream":{"_readableState":{"objectMode":false,"highWaterMark":16384,"buffer":{"head":{"data":{"type":"Buffer","data":[37,80,68,70,45,49,46,55,10,37,240,159,150,164,10,49,32,48,32,111,98,106,10,60,60,10,47,84,121,112,101,32,47,80,97,103,101,115,10,47,75,105,100,115,32,91,32,54,32,48,32,82,32,56,32,48,32,82,32,49,48,32,48,32,82,32,49,50,32,48,32,82,32,49,52,32,48,32,82,32,49,54,32,48,32,82,32,49,56,32,48,32,82,32,50,48,32,48,32,82,32,50,50,3 ..........
here is my Nginx file:
server {
listen 0.0.0.0:80;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://127.0.0.1:8080/;
proxy_redirect off;
}
}
Any help is appreciated
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
