公告
财富商城
积分规则
提问
发文
2019-05-19 02:23发布
唯我独甜
I'm using a webservice in Drupal 7. If I try to use Poster I get 'CSRF validation failed'. Before, I was connected with an administrator account.
I use the Firefox add-in Poster.
How can I fix this problem?
You need to pass along the CSRF token in the header of the service request.
To retrieve the token, navigate to:
http://www.example.com/?q=services/session/token
Copy the token to your clipboard.
Then in FireFox poster, using the "Headers" tab, add this name and value:
Now when you make requests, the token will be passed along correctly with FireFox Poster.
Here's a detailed blog post outlining this topic:
http://tylerfrankenstein.com/code/drupal-services-csrf-token-firefox-poster
最多设置5个标签!
You need to pass along the CSRF token in the header of the service request.
To retrieve the token, navigate to:
http://www.example.com/?q=services/session/token
Copy the token to your clipboard.
Then in FireFox poster, using the "Headers" tab, add this name and value:
Now when you make requests, the token will be passed along correctly with FireFox Poster.
Here's a detailed blog post outlining this topic:
http://tylerfrankenstein.com/code/drupal-services-csrf-token-firefox-poster