Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not work with query style requests #5

Open
mlsub opened this issue May 28, 2022 · 4 comments
Open

Does not work with query style requests #5

mlsub opened this issue May 28, 2022 · 4 comments

Comments

@mlsub
Copy link

mlsub commented May 28, 2022

I deployed this to test if I can use cloudflare workers to proxy my GET requests to B2 using the S3 compatible API, but it looks like it does not work with query string style requests because they don't contain authorization headers. I modified the code a little to make it read the query string instead of the headers but it looks like I still missed something.
I hope an updated version can make it work for query string style S3 compatible API requests.
Thanks

@Firaenix
Copy link

I'm also running into this issue.

Did you find a solution?

@metadaddy
Copy link
Member

Hi @misub, @Firaenix - just to confirm, you want to proxy presigned requests, where the URL looks like this? (Line breaks for clarity):

https://my.custom.domain.com/image.jpeg
?X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=00415f935c00000000aa%2F20240423%2Fus-west-004%2Fs3%2Faws4_request
&X-Amz-Date=20240423T222652Z
&X-Amz-Expires=86400
&X-Amz-SignedHeaders=host
&X-Amz-Signature=23ade1a4a891a5be9f69e84ae0e6d3df6129d154d335530e722435f279abae81

@Firaenix
Copy link

Ahh, on further research it's not necessarily the same issue, all I know is that using the AWS CLI I can list buckets and get files but I can't put. However in the AWS SDK for JavaScript I can't do anything, in the worker logs I noticed that the SDK sets a query parameter to specify that the command is a GET

@metadaddy
Copy link
Member

Hi @Firaenix - any logs you can post (with redaction as appropriate) would be very useful in figuring out what's going on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants