Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS issue, {mode: "no-cors"} doesn't work #88

Open
hugoblanc opened this issue Feb 9, 2018 · 2 comments
Open

CORS issue, {mode: "no-cors"} doesn't work #88

hugoblanc opened this issue Feb 9, 2018 · 2 comments

Comments

@hugoblanc
Copy link

hugoblanc commented Feb 9, 2018

I'm trying to use ical into an Ionic app but the developpement environnement is en local server and the request origin is http://localhost:8100

So when I call fromURL I get the following error message:
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled

But even with a call like that
ical.fromURL('http://url/cal.ics', {mode: 'no-cors'}, function (err, data) {})
THis doesn't work because the option is not recognize ...

@francoisauclair911
Copy link

You could try using : https://cors-anywhere.herokuapp.com
as in
ical.fromURL('https://cors-anywhere.herokuapp.com/https://url/cal.ics', {}, function (err, data) {})

@hugoblanc
Copy link
Author

hugoblanc commented Feb 27, 2019

https://cors-anywhere.herokuapp.com is perfectly working, but I finally implement my own cors proxy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants