Skip to content

Commit e309327

Browse files
committed
Add ability to customize the set of $_SERVER variables.
1 parent b58622d commit e309327

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ exports.request = function(options, cb) {
165165
server.SERVER_PORT = socket.localPort;
166166
}
167167
}
168-
cb();
168+
if (typeof (options.serverInitFunc) === 'function') {
169+
options.serverInitFunc(server, cb);
170+
} else {
171+
cb();
172+
}
169173
};
170174
return request(source, stream, initServer).tap(function() {
171175
// Ensure the stream is flushed before promise is resolved.

0 commit comments

Comments
 (0)