Closed AymenMarouani closed 3 years ago
Having similar issue, using Offline component.
https://api.ipify.org/?format=json request is throwing CORS error with HTTP 405 Method Not Allowed
in some parts of the Europe and India.
Hello, I'm also using the Detector component, the new ping url (https://api.ipify.org/?format=json ) is also giving CORS error, I'm from South America (Brazil), did you manage to solve this problem?
looking into another solution for default polling url.
Same issue.
The fix has been released. It is now pointing at the Star Wars API URL. After this learning experience we all faced with this issue, let's keep reminded that we cannot rely on external services and I highly recommend not relying on the default polling url- use it as a fallback.
Thank you all for your understanding! :)
Closing.
Quick heads up @cwise89: You might have quite some difficulties using the Star Wars API. It's quite easy to get a Maximum requests reached. Try again later.
response.
So, I'd recommend considering, making the request URL a required configuration, instead of switching the "unintentional DDOS targets" regularly. 😉
Hi,
Thanks a lot for the library, it saved my day,
Actually I'm using the Detector component in polling mode to detect if the user went offline or lost the network connection, I provided a URL for ping, but the problem was that I receive a CORS error that pollutes the browser's console, is it possible to just ignore the CORS error and consider a simple ping ? after all, if I received an answer and my browsers sees a CORS, I'm online.
I did the following wrokaround,
<Detector polling={{url:`${window.location.origin}/ui`}}/>
Best Regards.