diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-21 13:20:32 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-21 13:20:32 +0900 |
| commit | 21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76 (patch) | |
| tree | 80e05e203aa68997b0ef2571618c9e13d3e3d0da /src/web/server.ts | |
| parent | wip (diff) | |
| download | sharkey-21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76.tar.gz sharkey-21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76.tar.bz2 sharkey-21d6f305c76d88a91c8a5cbdfbc5ca8af72d2b76.zip | |
[Server] Fix bug
Diffstat (limited to 'src/web/server.ts')
| -rw-r--r-- | src/web/server.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/web/server.ts b/src/web/server.ts index 9c44807f94..a1b7130baf 100644 --- a/src/web/server.ts +++ b/src/web/server.ts @@ -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(); }); |