Design comparison
Solution retrospective
The challenge itself wasn't too hard, but dealing with the API was. When I tried sending my first post request to the API, I ran into this CORS error hassle. CORS essentially throws a wrench in the works when you're trying to make a request from one domain (like your web app) to another domain (an external API). It's like a security guard for your browser, making sure that requests are only made to the same place they originated from. To patch things up during local testing, I resorted to installing a Chrome extension. It helped bypass the CORS restrictions and made things work smoothly. However, the real challenge came when I deployed to Netlify, the CORS issue reared its head again. That's when I took a deeper dive and learned about setting up a Netlify serverless function to act as a go-between for the web app and the API. Even with that in place, it still wasn't smooth sailing. There was a need for some additional configurations to overcome the CORS hurdle. After a bit of trial and error, tweaking settings here and there, things finally fell into place. Learned a whole lot from that rollercoaster ride. Any suggestions for improvements are welcome!
Community feedback
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord