downforacross / downforacross.com

Web frontend for downforacross.com -- continuation of stevenhao/crosswordsio
https://downforacrosscom.downforacross1.now.sh
MIT License
220 stars 92 forks source link

CORS issue with development server #271

Closed meghabyte closed 1 year ago

meghabyte commented 1 year ago

Hi, when I try to run the development server (using yarn start), I am unable to load any puzzles due to an issue with fetching the puzzle list in src/api/puzzle_list.ts.

The full error message: localhost/:1 Access to fetch at 'http://api-staging.foracross.com/api/puzzle_list?page=0&pageSize=50&filter%5BnameOrTitleFilter%5D=&filter%5BsizeFilter%5D%5BMini%5D=true&filter%5BsizeFilter%5D%5BStandard%5D=true' from origin 'http://localhost:3020' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

I was previously able to get this to work using the same code. Has something changed?

stevenhao commented 1 year ago

should be resolved now, can you try again?

meghabyte commented 1 year ago

Yes, it works, thank you! Out of curiosity, was the fix anything I could have done on my end?

stevenhao commented 1 year ago

in this case, the staging server i was running was offline due to a devops issue. nothing you can do to fix that, but you could always run your own local backend server with yarn devbackendprod

stevenhao commented 1 year ago

closing this issue out, thanks for reporting it! appreciate it :)