Yii Ajax request CSRF can not be verified -
i use few different ajax calls in 1 of pages through couple of different methods.
chtml::link()
chtml::ajax()
- within
cgridview
since enabling csrf i'm having difficulty verifying token. correct way? i've read few posts, struggling implement. instance in chtml::link()
i've tried:
'data' => "yii::app()->request->csrftokenname = yii::app()->request->csrftoken",
and within cgridview
:
data: { yii::app()->request->csrftokenname => yii::app()->request->csrftoken },
1- fot ajax have ajax, ajaxlink , ajaxbutton not link.
2- csrf token works when use post request
3- add csrf token this:'data'
=>array('yii_csrf_token' => yii::app()->request->csrftoken)`
Comments
Post a Comment