Added CSRF tokens to non-partial templates.
This commit is contained in:
parent
2ea3c72a61
commit
83f76af6e8
24 changed files with 94 additions and 22 deletions
|
|
@ -17,7 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
//Config
|
||||
const config = require('../../config.json');
|
||||
|
||||
//Local Imports
|
||||
const csrfUtils = require('../utils/csrfUtils');
|
||||
|
||||
//channel functions
|
||||
module.exports.get = function(req, res){
|
||||
res.render('channel', {instance: config.instanceName, user: req.session.user});
|
||||
res.render('channel', {instance: config.instanceName, user: req.session.user, csrfToken: csrfUtils.generateToken(req)});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue