Angular 6 – No ‘Access-Control-Allow-Origin’ header is present on the requested resource

QuestionsCategory: QuestionsAngular 6 – No ‘Access-Control-Allow-Origin’ header is present on the requested resource
Ajay Malhotra Staff asked 1 year ago

Angular 6 – No ‘Access-Control-Allow-Origin’ header is present on the requested resource I got this error, when i was connecting my angular app with laravel. please help  

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Answers
Best Answer
Ajay Malhotra Staff answered 1 year ago

Solved: I found the solution when I am connecting my angular app with laravel in xampp:
 
You just need to add below code in yours xampp\apache\conf\httpd.conf and your problem will be solved:
 

Header set Access-Control-Allow-Origin "*"
Aksh replied 1 year ago

Thank a lot, you saved my lots of time..great

Ajay Malhotra Staff replied 1 year ago

welcome aksh and Happy to hear that It helped you..
Cheers..

Ajay Malhotra Staff replied 1 year ago

Also restart your server again if having any kind of problem.

Daniel replied 1 year ago

It solved my big issue.

Ajay Malhotra replied 1 year ago

Great..

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Your Answer

17 + 15 =

Positive SSL