mirror of
https://github.com/esphome/esphome.git
synced 2025-10-30 14:43:51 +00:00
Construct web_server assets at build time instead of run time (#4944)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
@@ -83,6 +83,7 @@ class WebServerBase : public Component {
|
||||
return;
|
||||
}
|
||||
this->server_ = std::make_shared<AsyncWebServer>(this->port_);
|
||||
// All content is controlled and created by user - so allowing all origins is fine here.
|
||||
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
|
||||
this->server_->begin();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user