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

Support arguments (canonicalQueryString) and UNSIGNED-PAYLOAD #2

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

smiba
Copy link

@smiba smiba commented Feb 11, 2024

Slightly messy PR, sorry about that

These changes provide

  1. UNSIGNED-PAYLOADS when doing a PUT request where ngx.var.request_body is empty (might happen when it does not fit in nginx body buffer)
  2. canonicalQueryString, allowing to use this library to sign requests containing query strings
  3. Some README modifications, the old readme did use an incompatible request_uri (it would contain the query string which is not valid!)
  4. Fixes for the warnings for race conditions on k_date/region/service
  5. A way to manually specify region and service, for when this library is used for a non AWS provider

To do:

  1. Handle QueryString's without value (?option instead of ?option=1 etc.)

@smiba
Copy link
Author

smiba commented Feb 21, 2024

0b08243 fixes the empty QueryStrings :)

Last thing to do is be more smart about routing requests like ?delete (bulk removals), but this is gonna require a fair bit more work, possibly outside of this library

@ssalinas
Copy link
Member

Hey @smiba , I'm not wure when I'll have a chance to test this in our own infra before merging. I take it you are able to use your own fork for now and aren't blocked here?

Thanks for the contribution by the way!

@smiba
Copy link
Author

smiba commented Feb 21, 2024

Yes! We're using this and it's been working fine, I specifically made these contributions to the code for our infra

(Even made a little write-up which includes using this library: https://medium.com/@PurpleDug/woof-tech-routing-s3-endpoints-and-doing-a-live-migration-on-a-production-environment-as-a-treat-8fa2bbd6784e)

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

Successfully merging this pull request may close these issues.

2 participants