From de67714cf805ad60589a48ad0da57f132cb21c7d Mon Sep 17 00:00:00 2001 From: Tom Hunkapiller Date: Fri, 10 Apr 2015 05:52:58 -0500 Subject: [PATCH] fix minify route path; update deprecated calls --- src/node/hooks/express/static.js | 2 +- src/node/hooks/express/tests.js | 2 +- src/node/hooks/express/webaccess.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/node/hooks/express/static.js b/src/node/hooks/express/static.js index 7ae20db29..7af54b5d9 100644 --- a/src/node/hooks/express/static.js +++ b/src/node/hooks/express/static.js @@ -13,7 +13,7 @@ exports.expressCreateServer = function (hook_name, args, cb) { // Minify will serve static files compressed (minify enabled). It also has // file-specific hacks for ace/require-kernel/etc. - args.app.all('/static/:filename', minify.minify); + args.app.all('/static/:filename(*)', minify.minify); // Setup middleware that will package JavaScript files served by minify for // CommonJS loader on the client-side. diff --git a/src/node/hooks/express/tests.js b/src/node/hooks/express/tests.js index 3157d68ed..fcd813817 100644 --- a/src/node/hooks/express/tests.js +++ b/src/node/hooks/express/tests.js @@ -50,7 +50,7 @@ exports.expressCreateServer = function (hook_name, args, cb) { args.app.get('/tests/frontend/*', function (req, res) { var filePath = url2FilePath(req.url); - res.sendfile(filePath); + res.sendFile(filePath); }); args.app.get('/tests/frontend', function (req, res) { diff --git a/src/node/hooks/express/webaccess.js b/src/node/hooks/express/webaccess.js index 60b3e6516..cb5a22076 100644 --- a/src/node/hooks/express/webaccess.js +++ b/src/node/hooks/express/webaccess.js @@ -57,10 +57,10 @@ exports.basicAuth = function (req, res, next) { res.header('WWW-Authenticate', 'Basic realm="Protected Area"'); if (req.headers.authorization) { setTimeout(function () { - res.send(401, 'Authentication required'); + res.status(401).send('Authentication required'); }, 1000); } else { - res.send(401, 'Authentication required'); + res.status(401).send('Authentication required'); } })); }