Hello, Dave! 👋
Good job on this challenge! I just finished this project too. There is a problem on Firefox. Console throws an CORS
error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https (Reason: CORS request did not succeed)
. I encountered this problem too. Read about this error. The fix is to send your request to a proxy. A proxy acts as an intermediary between a client and server. The proxy server operates in between the frontend web app making the request, and the server that responds with data. Add https://cors.bridged.cc/
to any URL you’re fetching from. In your example it will be: https://cors.bridged.cc/https://geo.ipify.org/api/v1?apiKey=yourapikey
. This is my solution if your curious.
Good luck with that, have fun coding! 💪
@tediko thanks so much for the link to your solution! It looks ace.
I’m off on holiday for a few days now but will look at it in more detail when I’m back as I can see there’s lot I don’t think of here!
Cheers!!
@dwhenson Happy holiday then! :)