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 URL signing for multiple methods #7

Merged

Conversation

chmhofer
Copy link
Contributor

Motivation: CORS file upload (http://www.w3.org/TR/cors/)

Joyent Manta supports CORS file uploads via the PUT request when the directory has the required CORS headers. The browser will send it as a preflighted request, i.e., it will first send an OPTIONS, then a PUT request. In order for this to work, we have to generate a signed URL that is valid for both requests.

node-manta has support for generating such a signature, but ruby-manta so far doesn't. This pull-request adds this functionality to ruby-manta. Now, a list of methods can be passed to the "method" parameter of gen_signed_url, and :options is regarded an allowed method.

I have adapted the test, too. It demonstrates how it is supposed to be used.

marsell added a commit that referenced this pull request Oct 23, 2013
Support URL signing for multiple methods
@marsell marsell merged commit d63d5b4 into TritonDataCenter:master Oct 23, 2013
@marsell
Copy link
Contributor

marsell commented Oct 23, 2013

Looks good. Thanks for the fix. :)

marsell pushed a commit that referenced this pull request Oct 23, 2013
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.

None yet

2 participants