-
Notifications
You must be signed in to change notification settings - Fork 77
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 for either pluggable HTTP clients or passing in Hackney options #75
Comments
Hi, Waffle uses Could you, please, provide more context for your issue? We use ExAws and you can override the default configuration. |
Sure. In order to use an HTTP proxy, you need to pass in Hackney options (not headers) as described here in the Hackney docs. While I can override ExAws to use a proxy, I cannot do that for Waffle itself since I can only configure the headers, not the Hackney options. Since remote downloads fail in my environment without using an outbound HTTP proxy, that means I can't use Waffle even though ExAws works fine. |
You can see an example of how ExAws supports this in Hackney through |
Ok, I get it, you want to use custom options for remote downloads. Good point, we definitely need that. As a workaround you could download the image upfront and then pass it as binary/path to the Waffle. |
Yup, that's correct. I think the best option would be making the HTTP backend for Waffle configurable like ExAws - it was pretty painless to write my own which used my proxied Finch setup instead of Hackney. However, that's probably more work. Just providing a |
Yes, indeed. It should be relatively straight forward to implement, similar to We could introduce something like Probably, better to allow per-uploader configuration with dynamic method call for more flexibility instead of static option in configuration file. |
Right now, there's no way to pass additional options through to hackney that I can find. This means I cannot use a proxy in my HTTP requests. That's required in my environment so Waffle is not usable at the moment.
ExAws gets around this in two ways:
hackney_opts
which get included in each requestI'd love to see the former but the latter would probably be simpler to implement and would also help.
The text was updated successfully, but these errors were encountered: