gaul / s3proxy

Access other storage backends via the S3 API
Apache License 2.0
1.65k stars 220 forks source link

Support overriding host for pre-signed URLs #315

Open gaul opened 4 years ago

gaul commented 4 years ago

From Twitter:

Is it possible to tell @S3Proxy in a docker, that it should use the IP of the host instead of 127.0.0.1 for presigned urls. Whatever I tried I always get the localhost IP and thereby can not use it from another machine on the network. Apprechiate your help!

https://twitter.com/eu_frey/status/1178988097876500481

simonfrey commented 4 years ago

Anything I can help here with? (e.g. examples)

phuongdh commented 3 years ago

Anything I can help here with? (e.g. examples)

Have you found a solution for this? We have the same problem and modifying the presigned URL's host will invalidate it. For example: http://127.0.0.1/bucket/key?queries from inside the container works, but http://mydomain/bucket/key?queries from outside returns 403 .

gaul commented 3 years ago

If either of you could give a self-contained example that would make this easier to fix.

lostfocus commented 2 years ago

Hi! I've written a small example here: https://github.com/lostfocus/s3proxy-demonstration

I hope that helps to demonstrate the problem.

rijnhard commented 1 year ago

Is this still an issue? Looking at using this for exactly this reason because they underlying S3 provider doesn't support pre signed urls. So running this seems like a nice workaround (if it works)

lostfocus commented 1 year ago

Seems like it - I just pulled the latest version of the container into my demonstration project from last May and still get the same result.

PatrickHuetter commented 3 months ago

Any news on this?