0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Handled error from express-session middleware (#10084)

no-issue
This commit is contained in:
Fabien O'Carroll 2018-10-30 16:16:33 +07:00 committed by GitHub
parent 923969b38c
commit b4096f412c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,7 +49,10 @@ const getSession = (req, res, next) => {
};
const createSession = (req, res, next) => {
getSession(req, res, function () {
getSession(req, res, function (err) {
if (err) {
return next(err);
}
const origin = getOrigin(req);
if (!origin) {
return next(new common.errors.BadRequestError({