Skip to content

Commit 3689006

Browse files
author
shasha
committed
support function for options.localAddress
1 parent 9b96cd7 commit 3689006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/http-proxy/common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ common.setupOutgoing = function(outgoing, options, req, forward) {
6060

6161

6262
outgoing.agent = options.agent || false;
63-
outgoing.localAddress = options.localAddress;
63+
outgoing.localAddress = typeof options.localAddress === 'function' ? options.localAddress() : options.localAddress;
6464

6565
//
6666
// Remark: If we are false and not upgrading, set the connection: close. This is the right thing to do

0 commit comments

Comments
 (0)