Skip to content

Commit

Permalink
fix: #9287, generate csrf_token on 404
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Feb 9, 2021
1 parent 783786c commit 94f72d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/404.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ exports.send404 = async function (req, res) {
if (res.locals.isAPI) {
return res.json({ path: validator.escape(path.replace(/^\/api/, '')), title: '[[global:404.title]]' });
}
await middleware.applyCSRFasync(req, res);
await middleware.buildHeaderAsync(req, res);
res.render('404', { path: validator.escape(path), title: '[[global:404.title]]' });
};

0 comments on commit 94f72d6

Please sign in to comment.