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

How to calculate SNR of signals in MATLAB? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -