mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Allow CORS for web_server (#3819)
This commit is contained in:
parent
55ad45e3ee
commit
d1c85fc3fa
1 changed files with 1 additions and 0 deletions
|
@ -81,6 +81,7 @@ class WebServerBase : public Component {
|
|||
return;
|
||||
}
|
||||
this->server_ = std::make_shared<AsyncWebServer>(this->port_);
|
||||
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
|
||||
this->server_->begin();
|
||||
|
||||
for (auto *handler : this->handlers_)
|
||||
|
|
Loading…
Reference in a new issue