DEV Community

AjayMalhotra
AjayMalhotra

Posted on

3 1

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

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs