Skip to content
Snippets Groups Projects
Commit 21d6f305 authored by syuilo's avatar syuilo
Browse files

[Server] Fix bug

parent 42268f0f
No related branches found
No related tags found
No related merge requests found
......@@ -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();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment