fastsurvey / backend

FastSurvey's backend that's crunching the data
1 stars 0 forks source link

Add CORS policy #44

Closed dostuffthatmatters closed 3 years ago

dostuffthatmatters commented 3 years ago

Access to XMLHttpRequest at 'https://backend.dev.fastsurvey.io/users/mumbojambo' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Solution: https://fastapi.tiangolo.com/tutorial/cors/

empicano commented 3 years ago

If I understand it correctly this should do right? Or do we need other origins (e.g. http)? I'll read into this a little more to understand what this does 😄

dostuffthatmatters commented 3 years ago

Great, thank you!

I'll just allow any origin. That's easier to manage ☺️