Sailsjs using cluster mode pm2 and CSRF

I am running sailsjs app with pm2

and its cluster mode.

Now the problem is that since I am making cross-domain requests with CSRF validation, only one of the clusters has correct access, the others are giving me a CSMF mismatch error.

How do you use pm2 with CSRF?

+3


source to share


1 answer


sails.js has built-in support for using Redis or MongoDB to share session state across a cluster, for example with the .io module, Heroku, or a custom cluster using pm2. You can set config values ​​for this in config/session.js

.

Cm:



+1


source







All Articles