fix minify route path; update deprecated calls
This commit is contained in:
parent
4385598de6
commit
de67714cf8
|
@ -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.
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue