2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-30 15:24:11 +03:00

forgot to add optional port

This commit is contained in:
Jared Lotti
2016-10-17 15:24:17 -04:00
committed by GitHub
parent 5c4ca4ccc4
commit ce1ecdae7a
+1 -1
View File
@@ -95,7 +95,7 @@ module.exports = function httpAdapter(config) {
if (proxy) {
options.host = proxy.host;
options.hostname = proxy.host;
options.headers.host = parsed.hostname;
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;
}