aws-s3-proxy icon indicating copy to clipboard operation
aws-s3-proxy copied to clipboard

Doesn't work behind Nginx reverse proxy

Open cablespaghetti opened this issue 4 years ago • 7 comments

Whilst this seems to be reliable when accessed directly, when behind my Kubernetes cluster's Nginx ingress I get a lot of "upstream prematurely closed connection while sending to client" errors and Chrome fails to load a high percentage of the resources. If I request a single file using curl it seems to work. This is using HTTP/1.1.

cablespaghetti avatar Jul 19 '19 15:07 cablespaghetti

@cablespaghetti Did you find a solution? I am experiencing something similar. Although the ingress does not seem to be a problem a keycloak gatekeeper proxy between the ingress and the s3-proxy does not work with larger files.

thomasmhofmann avatar Oct 11 '19 15:10 thomasmhofmann

~This fork solved my issues https://github.com/daveoxley/aws-s3-proxy~ This fork has been causing me issues and crashing

wesmcouch avatar Oct 15 '19 14:10 wesmcouch

@thomasmhofmann @wesmcouch Sorry not found a solution. It would be really good to have a version of this I could use in production.

cablespaghetti avatar Oct 19 '19 06:10 cablespaghetti

@cablespaghetti I was having this issue when behind an aws alb, and I solved it by setting CONTENT_ENCODING=false in the env. Which is actually enabled by default, but documented incorrectly (see https://github.com/pottava/aws-s3-proxy/issues/21). Hopefully this will help you

Dirrk avatar Oct 22 '19 02:10 Dirrk

Sorry for the inconvenience, everyone! @Dirrk Thanks for the advice. I hope it works.

Since I fixed this issue (https://github.com/pottava/aws-s3-proxy/issues/20) recently as well, you may not have to change any configurations.

pottava avatar Nov 03 '19 17:11 pottava

Great thanks. I'll try the new version as soon as I can.

cablespaghetti avatar Nov 03 '19 17:11 cablespaghetti

Just for the record. My problem was not related to aws-s3-proxy. It was a keycloak gatekeeper in front of the proxy that needed to be configured for longer timeouts.

thomasmhofmann avatar Nov 07 '19 12:11 thomasmhofmann