I have an API that uses barryvdh/laravel-cors for CORS.
If I do php artisan serve, and access my api via localhost:8000/api/something
then it works.
However if I try to access localhost/project/public/api/something
, then I get an error saying
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://ift.tt/2v4IK3n' is therefore not allowed access.
Any ideas what's causing this issue?
Further Information: I need to access the API via the public/ directory because I'm configuring a virtual Host to have the API (and UI) work via SSL (self-signed certificates)
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire