2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-02 16:04:10 +03:00

Merge pull request #491 from Jarlotee/patch-1

Fix proxy bugs
This commit is contained in:
Matt Zabriskie
2016-10-18 08:59:19 -05:00
committed by GitHub
+2
View File
@@ -94,6 +94,8 @@ module.exports = function httpAdapter(config) {
if (proxy) {
options.host = proxy.host;
options.hostname = proxy.host;
options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
options.port = proxy.port;
options.path = parsed.protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path;
}