overthesun / simoc-sam

Back-end system to support SIMOC Live air quality monitor sensor array as used at the SAM Mars habitat analog.
https://samb2.space/
2 stars 1 forks source link

Add cors_allowed_origins parameter for frontend #4

Closed hiyaryan closed 2 years ago

hiyaryan commented 2 years ago

This PR allows the mock data to be sent from simoc-sam to simoc-web. It resolves the following issue.

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8081/socket.io/?EIO=4&transport=polling&t=NslouJ3. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing)

ezio-melotti commented 2 years ago

I merged the PR, even though this only fixes the problem while testing on localhost. We will probably need to come back to this once we deploy this in the real world.