qor-example icon indicating copy to clipboard operation
qor-example copied to clipboard

Consuming API with REST client gives error on CSRF

Open sredxny opened this issue 7 years ago • 1 comments

Hi, I setted up the qor-example project in my local enviroment and everuthing is working, however when I consume the API using Postman I get Could not authorize you because 'CSRF detected' I know that there's a middleware that gives this error, but then why I can only make GET petitions?

But, if I consume the API with curl from the CLI it seems to works fine, I sent for example:

curl -i -X DELETE --url http://localhost:7000/admin/colors/1 --header 'Accept:text/xml'

sredxny avatar May 04 '17 17:05 sredxny

@sredXNY http://localhost:7000/admin/colors/1 is not the correct API url.

Normally, for API consumption the URL is prefixed with /api in the URL so i cannot replicate your problem at my end.

muhammadn avatar Jun 01 '17 16:06 muhammadn