Click here to Skip to main content
15,867,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hey guys,

Can someone help me out here. I wrote a WEB API which is hosted on a local xampp server and I m getting this error from my browser:

Failed to load https://example.com/: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://192.168.100.137' is therefore not allowed access.

i cant figure out what to do I already spend hours on this topics with altering my apache configuration and altering my code.

What I have tried:

ALtering the Apache httpd.conf file with headers that allow this origin request.
Creating a httpdaccess file in my httpdoc folder with the right headers.

Thanks up in front!

Greetings Paul
Posted
Comments
j snooze 21-Nov-17 17:39pm    
Does this link help? I've only struggled through the wonders of CORS using .NET myself so I have felt the pain.

https://stackoverflow.com/questions/34872760/how-do-i-enable-cross-origin-resource-sharing-on-xampp

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900