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

Library incorrectly removes the hostname and protocol from Web Proxy paths #8

Merged
merged 1 commit into from
May 14, 2015

Conversation

kellysutton
Copy link
Contributor

Given an example Web Proxy source: my-web-proxy.imgix.net

This Ruby library incorrectly removes the protocol and hostname from full URL "paths" given to the library, e.g.

client = Imgix::Client.new(host: 'my-web-proxy.imgix.net', token: 'your-token', secure: true)
client.sign_path("https://some-other-image-site.com/cats.png")
 #=> "https://my-web-proxy.imgix.net/cats.png?&s=abc123"

Instead, the URL should maintain the full URL of the input image:

https://my-web-proxy.imgix.net/https://some-other-image-site.com/cats.png?&s=abc123

@kellysutton
Copy link
Contributor Author

Note on this. This now works correctly with the Client#path style of generating URLs, e.g.

client.path("https://google.com/cats.gif").to_url

It does not yet work with Client#sign_path.

kellysutton added a commit that referenced this pull request May 14, 2015
Library incorrectly removes the hostname and protocol from Web Proxy paths
@kellysutton kellysutton merged commit f559fae into master May 14, 2015
@kellysutton kellysutton deleted the full-length-urls branch May 14, 2015 15:13
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.

1 participant