I 'm using Laravel 5.7 to make an API
I 'm using swagger to make the documentation
composer require :
"require": {
"php": ">=5.6.4",
"darkaonline/l5-swagger": "^5.7.3",
"filp/whoops": "~2.0",
"laravel/framework": "5.7.*",
"laravel/passport": "~4.0",
"laravel/tinker": "~1.0",
"mll-lab/laravel-graphql-playground": "^2.1",
"nuwave/lighthouse": "^4.15",
"paragonie/random_compat": "~2.0",
"zircote/swagger-php": "3.*"
},
Every thing is working ok, but when I try to execute curl on the page of swagger documentation, I got the errors:
actions.js:453
TypeError: Cannot set property 'X-CSRF-TOKEN' of undefined
script of the error :
requestInterceptor: function() {
this.headers['X-CSRF-TOKEN'] = 'hM4lUy0ednXXWEFwYc1iRprnSuBuPwQH6Z4pi6v8';
return this;
},
the requests are correct and tested directly on the URL, but with swagger curl , it is not working. Please Help me.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire