mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
fix minify route path; update deprecated calls
This commit is contained in:
parent
4385598de6
commit
de67714cf8
3 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
|
||||||
|
|
||||||
// Minify will serve static files compressed (minify enabled). It also has
|
// Minify will serve static files compressed (minify enabled). It also has
|
||||||
// file-specific hacks for ace/require-kernel/etc.
|
// 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
|
// Setup middleware that will package JavaScript files served by minify for
|
||||||
// CommonJS loader on the client-side.
|
// 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) {
|
args.app.get('/tests/frontend/*', function (req, res) {
|
||||||
var filePath = url2FilePath(req.url);
|
var filePath = url2FilePath(req.url);
|
||||||
res.sendfile(filePath);
|
res.sendFile(filePath);
|
||||||
});
|
});
|
||||||
|
|
||||||
args.app.get('/tests/frontend', function (req, res) {
|
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"');
|
res.header('WWW-Authenticate', 'Basic realm="Protected Area"');
|
||||||
if (req.headers.authorization) {
|
if (req.headers.authorization) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
res.send(401, 'Authentication required');
|
res.status(401).send('Authentication required');
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
res.send(401, 'Authentication required');
|
res.status(401).send('Authentication required');
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue