Absolutely losing my mind with the API and could use come help!

Avatar image for whygreg
WhyGreg

2

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

I've been messing with the API for the past few hours and although I'm able to get successful responses when I use tools to send my requests when I attempt to connect via my dev machine I'm getting a CORS issue that reads "Origin [localURL:port] is not allowed by Access-Control-Allow-Origin." I've taken to google trying to remedy the situation to no avail so I'm hoping someone might have a somewhat easy and elegant solution in the wings. If you would like any more info please let me know. Thanks in advance for any/all help!

Avatar image for kalel1938
kalel1938

12

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

It's not you it's them. LOL

If you are making API call from the front-end the dirty fix is the install a extension in your browser that let's you bypass CORS.

If you want to make it work in real world application you'd need to make your API calls in the code on the server where you won't have to deal with CORS.