mirror of
https://github.com/esphome/esphome.git
synced 2025-01-04 18:47:43 +01:00
Allow CORS for web_server (#3819)
This commit is contained in:
parent
55ad45e3ee
commit
d1c85fc3fa
@ -81,6 +81,7 @@ class WebServerBase : public Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->server_ = std::make_shared<AsyncWebServer>(this->port_);
|
this->server_ = std::make_shared<AsyncWebServer>(this->port_);
|
||||||
|
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
|
||||||
this->server_->begin();
|
this->server_->begin();
|
||||||
|
|
||||||
for (auto *handler : this->handlers_)
|
for (auto *handler : this->handlers_)
|
||||||
|
Loading…
Reference in New Issue
Block a user