Angular2 Codepen CORS error

I am trying to http.get request to wikipedia api. But it’s getting Access-Control-Allow-Origin is not allowed errors. Please could you fix it for me? I’m trying it for hours. I’ve tried a couple of methods. It still doesn’t work.

add “&origin=*” to wikipedia api url. See my codepen for finished solution.
Here are helpful links about CORS.
http://restlet.com/company/blog/2015/12/15/understanding-and-using-cors/
http://restlet.com/company/blog/2016/09/27/how-to-fix-cors-problems/

1 Like