Skip to content

Commit d166354

Browse files
committed
[fix] default port
1 parent 18341d5 commit d166354

File tree

3 files changed

+4
-193
lines changed

3 files changed

+4
-193
lines changed

lib/caronte/common.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ var common = exports;
2121
*/
2222

2323
common.setupOutgoing = function(outgoing, options, req, forward) {
24-
['host', 'hostname', 'port', 'socketPath', 'agent'].forEach(
24+
outgoing.port = options[forward || 'target'].port ||
25+
(~['https:', 'wss:'].indexOf(options[forward || 'target'].protocol) ? 443 : 80);
26+
27+
['host', 'hostname', 'socketPath', 'agent'].forEach(
2528
function(e) { outgoing[e] = options[forward || 'target'][e]; }
2629
);
2730

lib/caronte/streams/forward.js

-88
This file was deleted.

lib/caronte/streams/proxy.js

-104
This file was deleted.

0 commit comments

Comments
 (0)