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

All comments

  • faizal789 370

    @faizal789

    Submitted

    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?

    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
  • Sławek 310

    @SlawekZet

    Posted

    Nicely done!

    However, you need to work a little bit more on validation, as the calculation is done even if I put 313 days as input and 56 as a month (with month there is no error message displayed).

    Either way - good job :)

    0
  • Sławek 310

    @SlawekZet

    Posted

    Hey! It's only my preference, but I would delete the <main> tag and add margin: 1rem; (value is just an example) so it would scale nicely. Alternatively, you can delete div with a .card class and move everything to main + add the margin. Right now, after reaching approx 300 px brake point it starts to overlap - as shown on this screenshot - https://monosnap.com/file/QsyRUhlZAm7rQ6ykuCv4G8QwcUPpKl But still, it's only my preference :) other than that it's great!

    0