diff --git a/lib/http_server.js b/lib/http_server.js index cd7cdb3..b727d8c 100644 --- a/lib/http_server.js +++ b/lib/http_server.js @@ -173,7 +173,9 @@ if (req.url.match(/\.\./)) { return next(); } - handler = (_ref2 = (_base = this.staticHandlers)[root]) != null ? _ref2 : _base[root] = connect["static"](join(root, "public")); + handler = (_ref2 = (_base = this.staticHandlers)[root]) != null ? _ref2 : _base[root] = connect["static"](join(root, "public"), { + redirect: false + }); return handler(req, res, next); }; diff --git a/src/http_server.coffee b/src/http_server.coffee index 718b6d4..dfc853f 100644 --- a/src/http_server.coffee +++ b/src/http_server.coffee @@ -157,7 +157,7 @@ module.exports = class HttpServer extends connect.HTTPServer if req.url.match /\.\./ return next() - handler = @staticHandlers[root] ?= connect.static join(root, "public") + handler = @staticHandlers[root] ?= connect.static(join(root, "public"), redirect: false) handler req, res, next # Check to see if the application root contains a `config.ru`