api icon indicating copy to clipboard operation
api copied to clipboard

Web requests failing, CORS not supported

Open Flassari opened this issue 8 years ago • 3 comments

Web applications communicating with Wunderlist REST API is working on fewer and fewer browsers as the API doesn't implement Cross-Origin Resource Sharing (CORS). This is breaking my web-apps using the API.

Chrome no longer allows any authenticated requests through, instead it gives an error message:

Failed to load https://a.wunderlist.com/api/v1/tasks?list_id=xxxx: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mywebsite.com' is therefore not allowed access.

This can be fixed by adding a Access-Control-Allow-Origin header to any pre-flight (Request type: OPTIONAL) requests to the Wunderlist API, populating it with either the requests Origin http header, or simply a wildcard (*).

Flassari avatar Dec 05 '17 12:12 Flassari

I'm having the same issue at the moment. Is there a fix? What can I do on my end to get it to work?

mvaneijgen avatar Jun 14 '18 13:06 mvaneijgen

Wunderlist doesn't seem to be updated anymore so hacks are needed. Servers don't have this problem, so you can make a web service proxy that basically forwards your Wunderlist requests. That and other hacky solutions can be found here: https://gist.github.com/jesperorb/6ca596217c8dfba237744966c2b5ab1e

Flassari avatar Jun 14 '18 13:06 Flassari

@Flassari thanks for the reply, will take a look at your suggestion. A server would be great an option, but I first just wanted to test things out.

Yeah, thanks Microsoft... Buying great apps and then letting them slowly bleed to death. Or is this something I can't say anymore now that they also own this platform...

mvaneijgen avatar Jun 15 '18 09:06 mvaneijgen