Skip to content

Commit d4cedbc

Browse files
committed
fix(httpModule): only lookup in local directory
1 parent 81c3f74 commit d4cedbc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/server/utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22

33
var fs = require("fs");
4+
var path = require("path");
45
var filePath = require("path");
56
var connect = require("connect");
67
var Immutable = require("immutable");
@@ -73,7 +74,8 @@ var serverUtils = {
7374
* Note, this could throw, but let that happen as
7475
* the error message good enough.
7576
*/
76-
return require(httpModule);
77+
var maybe = path.resolve(process.cwd(), "node_modules", httpModule);
78+
return require(maybe);
7779
}
7880

7981
if (options.get("scheme") === "https") {

0 commit comments

Comments
 (0)