Skip to content

Conversation

@chromoxdor
Copy link
Contributor

Next try :)

I found out that CORS was only for /json and /metrics enabled. With this change, CORS is now globally enabled for ESP8266 builds, to get the same behavior as in ESP32 builds…

@chromoxdor
Copy link
Contributor Author

@TD-er: This would be ready to merge too...

@TD-er
Copy link
Member

TD-er commented Jan 15, 2026

@TD-er: This would be ready to merge too...

Can you have a look at my last question, right above your reply?

@chromoxdor
Copy link
Contributor Author

Can you have a look at my last question, right above your reply?

You seem to see something I do not. :) What do you mean?
Bildschirmfoto 2026-01-15 um 20 07 22

@TD-er
Copy link
Member

TD-er commented Jan 15, 2026

image @chromoxdor

@chromoxdor
Copy link
Contributor Author

chromoxdor commented Jan 15, 2026

Strange.. I do not see your entry on my side.
But you are right. I removed this part because it resulted in two "allow origin" entries, which the browser complains about then.
There must be a better solution, but I am having trouble fully understanding the code in this regard...
Any help is much appreciated. :)

@tonhuisman
Copy link
Contributor

I removed this part because it resulted in two "allow origin" entries, which the browser complains about then

That's because the true parameter in startStream adds that allow-origin, but also the * origin parameter adds it, after enabling CORS. Setting that first parameter to false solves that 😉

@chromoxdor
Copy link
Contributor Author

That's because the true parameter in startStream adds that allow-origin, but also the * origin parameter adds it, after enabling CORS. Setting that first parameter to false solves that 😉

Exactly my thinking. But I am not sure if it also affects ESP32 builds since I have struggled to understand. So I got tired of investigating. :)

@chromoxdor
Copy link
Contributor Author

But I am not sure if it also affects ESP32

So it seems it doesn't
Just tested all and it looks good...

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.

3 participants