WARNING: Can't verify CSRF token authenticity

Hello everyone… anyone can help me to solve my problem?
It my first time using dhtmlx scheduler, it’s awesome and beautiful Scheduler like google calendar. I was playing around with this javascript, but now I got stuck…

here is my code…

// javascript


<div style='position:absolute; bottom:20px'>
<input type='button' value='Save data to un-secure feed' onclick='try_csrf("./data/events.php","Un-Secure")'>
<input type='button' value='Save data to secure feed' onclick='try_csrf("./data/events_safe.php","Secure")'>

the problem is… I always get error “WARNING: Can’t verify CSRF token authenticity”,
I think it because there is no authentication token when I submit new data / update existing data.
My application always reject this request and render 401 Unauthorized.

How can I add the authentication token, so… it will pass to my controller when I add / update data in my Scheduler page. I’m using rails 3.2

I always get error “WARNING: Can’t verify CSRF token authenticity”
This message is not related to DHTMLX component, are you using some php framework on server side ?

To have CSRF protection on connector level, you need only to add

	ConnectorSecurity::$security_key = true;

in connector file.

If you are using some server side solution with its own CSRF protection, it possible to embed custom security key in all dataprocessor calls. Which can be done like

var dp = new dataProcessor("./data/events_safe.php?some_key=<?php echo $key; ?>");

Thank’s for your respond… yeah… I’ll try this one…