A third party security review is suggesting I need to add CSRF prevention to my javascript remoting calls. I'm not sure what is the best way to proceed. Switching to an apex:form to utilize built in CSRF prevention is not an option for me.
I am aware that the element input#com.salesforce.visualforce.ViewStateCSRF contains an anti-CSRF token, but if I pass it into my remoting calls, what would I have to compare it to server-side?
Would it be insecure if I rolled my own anti-CSRF token by generating a random string in my page's constructor and injecting it into my remoting calls?