Skip to content

Conversation

@mryel00
Copy link
Contributor

@mryel00 mryel00 commented Nov 3, 2025

Missing CORS header can result in wrong errors on the client application, if the client is not on the same host as the server. An example setup would be Mainsail hosted locally for testing and camera-streamer hosted on a Pi.

On the screenshot you can see a 500 status code thrown by an unavailable STUN server. Someone should expect a response with status code 500 and a body containing Not complete from the server. Instead you get a TypeError in the client, as the response could not get fetched because of the missing CORS header.

grafik

Adding CORS to each response should not be harmful and allows the processing of the whole response, even if the request was not successful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant