As it says in the title, I’m looking for a middleware for express.js or connect that will enable me to make csrf-safe requests.
The csrf-middleware in connect creates a new token per request, which makes POST-requests over Ajax not very easy.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to only create a new CSRF token per session instead of per request or something, you could always take advantage of the fact that that Connect’s csrf middleware lets you pass in your own token generation function. For example: