DEV Community

AjayMalhotra
AjayMalhotra

Posted on

No 'Access-Control-Allow-Origin

I am making an application with angular and backend as laravel but when I hit the api, I get "No 'Access-Control-Allow-Origin' header is present on the requested resource" and I am able to solve this issue and here I sharing that and hope it will help others.

Access-Control-Allow-Origin

Thank you
Therichpost

Top comments (2)

Collapse
 
abelagoi profile image
Agoi Abel Adeyemi

Hi there, you can check out this package: github.com/barryvdh/laravel-cors.

I personally use it to solve this problem too.

Collapse
 
ajaydeveloper profile image
AjayMalhotra

nice