mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-28 03:53:08 +02:00
[Server] Fix bug
This commit is contained in:
parent
42268f0fd4
commit
21d6f305c7
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ app.use(compression());
|
|||
app.use((req, res, next) => {
|
||||
res.header('X-Frame-Options', 'DENY');
|
||||
|
||||
res.locals.user = (req.headers['cookie'].match(/i=(!\w+)/) || [null, null])[1];
|
||||
res.locals.user = ((req.headers['cookie'] || '').match(/i=(!\w+)/) || [null, null])[1];
|
||||
|
||||
next();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue