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.