-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Proxy #355
Proxy #355
Conversation
It looks like there are some linting failures with this change. Also, it would be great if you could write a test that covers this new scenario. That said, is BASIC the only authentication type there is for Proxy-Authentication? If not, we may be introducing more bugs here. FWIW in the meantime you can always inject arbitrary headers to requests. You can even use global events to inject the header into every request: AWS.events.on('build', function(req) {
var httpOptions = req.service.config.httpOptions || {};
if (httpOptions.proxy && req.httpRequest.endpoint.auth !== undefined) {
req.httpRequest.headers['Proxy-Authorization'] = 'BASIC ' +
new Buffer(req.httpRequest.endpoint.auth).toString('base64');
}
}); |
Fixed the lint failure, I'll see if I can write a testcase for this when I've got some time to spare. Good point about BASIC not being the only authentication scheme but I'm not really sure if it could potentially introduce more bugs, currently proxy authentication isn't working for any scheme I assume. Since we're doing deployment through the grunt-aws-s3 module I'm unsure we can use the global events to inject the header. Thanks for the feedback. |
@nickdk you should be able to use the |
@nickdk thanks for the pull request! We've deliberated on this issue for some time, and given the many different proxy server implementations and protocols, we think the best way to support proxies is to configure the SDK to use an There a number of We've documented how to configure the SDK with an I'm going to mark this as closed because there is no plan to build proxy support in the SDK at this time. Feel free to open an issue if you have any questions, and thanks again! |
Thanks @AdityaManohar, forgot that this pull request was actually still open. I think we're still using my fork at my company to support our proxy, so thanks for the developer guide to do this properly. We'll start using this solution so we can ditch my fork as soon as possible. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread. |
Had some problems with using a proxy while uploading code through the grunt-aws-s3 module, apparently the proxy at our company was trying to use the aws secret in the Authorization header as the proxy credentials which of course always fails and results in a http 407. This seems to be fixed if the Proxy-Authorization header is set with the actual proxy credentials. Not entirely sure but it could be that these issues are related and possibly fixed:
#108
#26