Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Responsive Url Shortening App Using React and React Query

faizal789 370

@faizal789

Desktop design screenshot for the URL shortening API landing page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
  • API
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


I have an error like this in this project when accessing the /api/v1/shorten endpoint.

Access to XMLHttpRequest at 'https://cleanuri.com/api/v1/shorten' from origin 'https://faizal789.github.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Does anyone know how to solve it?

Community feedback

Sławek 310

@SlawekZet

Posted

What you have to do is to create a proxy server that will deal with the CORS issue. I did that for the first version of my solution. It was working like that: Shortly App --> proxy server --> CleanUri API. Here is the proxy repo: https://github.com/SlawekZet/express-CORS-proxy I've deployed it on Netlify, so it should be ready to go :)

1

xyzeez 670

@xyzeez

Posted

@SlawekZet your solution isn't working also :(

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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