node.js - How can I embed a CSRF token in a JavaScript file? -


i have node.js application in have implemented csrf. it's working fine, , when had javascript inline in jade file, used #{token} token javascript.

however, i've moved javascript external files, , can't figure out simple way input csrf token code. how can so?

you can implant token 1 dom element, say, hidden div. , use javascript element , read token.


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -