Created
August 26, 2019 09:05
-
-
Save MohiuddinAkib/2b909497ffd6d563b04c81eb9151a875 to your computer and use it in GitHub Desktop.
sending csrf token to spa with csurf library and express.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.all('*', function (req, res) { | |
res.cookie('XSRF-TOKEN', req.csrfToken()) | |
res.render('index') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment