mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-26 12:21:36 +03:00
Merge pull request #1226 from halfdan/csrf-token
Fix CSRF propery deprecated warning
This commit is contained in:
commit
fb97dd6e29
@ -111,7 +111,7 @@ function ghostLocals(req, res, next) {
|
|||||||
res.locals = res.locals || {};
|
res.locals = res.locals || {};
|
||||||
res.locals.version = packageInfo.version;
|
res.locals.version = packageInfo.version;
|
||||||
res.locals.path = req.path;
|
res.locals.path = req.path;
|
||||||
res.locals.csrfToken = req.session._csrf;
|
res.locals.csrfToken = req.csrfToken();
|
||||||
|
|
||||||
if (res.isAdmin) {
|
if (res.isAdmin) {
|
||||||
_.extend(res.locals, {
|
_.extend(res.locals, {
|
||||||
|
Loading…
Reference in New Issue
Block a user