fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit c508019ca0 - Show all commits

View file

@ -206,11 +206,13 @@ export class GBServer {
// ... some not authenticated middlewares
server.use((req, res, next) => {
if (req.originalUrl.startsWith('/logs')) {
var user = auth(req);
if (!user || !admins[user.name] || admins[user.name].password !== user.pass) {
res.set('WWW-Authenticate', 'Basic realm="example"');
return res.status(401).send();
}
}
return next();
});