You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a scenario where it would be nice if the Bucket client could follow redirects from object storage backends, specifically, 302 responses. This comes into play if someone is running a reverse proxy that forwards http->https, for example, in front of minio. But it also comes up if you're using GCS, which can return 302 responses.
Would you be open to adding support for following redirects? If so I can submit a PR, but I could use some guidance on where the best place to add this config should be since it looks like the different providers have their own configs. exthttp.HTTPConfig seems like a good place, but it looks like that's only used by S3 and Azure. I'd also be interested to see if you have any thoughts on when redirects should be allowed. My thinking is we may only want to follow redirects for GET and HEAD requests.
The text was updated successfully, but these errors were encountered:
Hey @jhalterman, thanks for opening this up, the requirement and proposal sounds reasonable to me. Would you like to take a stab at this? Although I'm also not sure what would be the best place to add this if we want to make this possible for all providers in a uniform fashion.
I'm good to take a stab if I can get something working relatively quickly since this would be nice to have, but not a huge priority for me. I started working on a PR, and was looking at S3 in particular, but quickly realized that we'd need to temporarily either swap out the bucket client's URL or the bucket client itself in order to follow the redirect, which gets into awkward territory.
One other thing worth noting in case anyone picks this up at some point: we'd need to guard against redirect loops. The simplest solution is to have a max number of redirects, ex: 3.
We have a scenario where it would be nice if the Bucket client could follow redirects from object storage backends, specifically, 302 responses. This comes into play if someone is running a reverse proxy that forwards http->https, for example, in front of minio. But it also comes up if you're using GCS, which can return 302 responses.
Would you be open to adding support for following redirects? If so I can submit a PR, but I could use some guidance on where the best place to add this config should be since it looks like the different providers have their own configs.
exthttp.HTTPConfig
seems like a good place, but it looks like that's only used by S3 and Azure. I'd also be interested to see if you have any thoughts on when redirects should be allowed. My thinking is we may only want to follow redirects for GET and HEAD requests.The text was updated successfully, but these errors were encountered: