Closed sakirma closed 4 years ago
Sorry, I think I figured out where the problem comes from.
I use Ionic + Angular and a httppost first calls an OPTION method before calling a POST method. Which could be the reason why flash is consumed before the POST method
Problem still persists
If you are console logging req.flash() before actually passing it back to the client, the console log will consume what is inside the req.flash() before you pass it on. This is because the flash middleware is only single read. So take out the console log!
Hi,
I have been using connect-flash for my nodejs server which uses express 4 and it is hosted from localhost:3000. This works fine when I post with postman, but if I call this server from another server then req.flash() returns an empty array