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

Allow GET/HEAD on signed URLs #859

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Conversation

josephglanville
Copy link
Contributor

This allows downloading from signed URLs.

As with uploads, there is no signature verification etc.

@@ -263,6 +263,7 @@ func (s *Server) buildMuxer() {

// Signed URL Uploads
s.mux.MatcherFunc(s.publicHostMatcher).Path("/{bucketName}/{objectName:.+}").Methods(http.MethodPost, http.MethodPut).HandlerFunc(jsonToHTTPHandler(s.insertObject))
s.mux.MatcherFunc(s.publicHostMatcher).Path("/{bucketName}/{objectName:.+}").Methods(http.MethodGet, http.MethodHead).HandlerFunc(s.getObject)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm interesting, I thought this already worked? 🤔

@@ -263,6 +263,7 @@ func (s *Server) buildMuxer() {

// Signed URL Uploads
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Signed URL Uploads
// Signed URL uploads and downloads

Copy link
Owner

@fsouza fsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll address the suggestion after merging.

@fsouza
Copy link
Owner

fsouza commented Aug 26, 2022

Apologies for the delay. I had completely forgotten about this PR.

@fsouza fsouza merged commit 68abd60 into fsouza:main Aug 26, 2022
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