Skip to content

Commit d8795a8

Browse files
committed
fix: force HTTP for unix
1 parent 36c0228 commit d8795a8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/testutil.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ var servers = [];
1010

1111
// TODO: make this an options dict
1212
export function addTarget(proxy, path, port, websocket, targetPath, sslOptions, unixSocketPath) {
13-
var proto = sslOptions ? "https" : "http";
13+
var proto;
1414
var listenTarget;
1515
var target;
1616

1717
if (unixSocketPath) {
1818
listenTarget = decodeURIComponent(unixSocketPath);
19+
proto = "http";
1920
target = "unix+" + proto + "://" + unixSocketPath;
2021
} else {
22+
proto = sslOptions ? "https" : "http";
2123
target = proto + "://" + "127.0.0.1:" + port;
2224
listenTarget = port;
2325
}

0 commit comments

Comments
 (0)