Skip to content

Commit c6f4f20

Browse files
aredridelJames Halliday
authored andcommitted
Use correct port for HTTPS
1 parent 35dcde1 commit c6f4f20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ http.request = function (params, cb) {
88
params.port = parseInt(window.location.port, 10);
99
}
1010
if (!params.host) params.host = window.location.hostname;
11-
if (!params.port) params.port = 80;
11+
if (!params.port) params.port = params.scheme == 'https' ? 443 : 80;
1212
if (!params.scheme) params.scheme = window.location.protocol.split(':')[0];
1313

1414
var req = new Request(new xhrHttp, params);

0 commit comments

Comments
 (0)