diff --git a/esphome/components/web_server_base/web_server_base.h b/esphome/components/web_server_base/web_server_base.h index bc37337ca5..cdabe66d44 100644 --- a/esphome/components/web_server_base/web_server_base.h +++ b/esphome/components/web_server_base/web_server_base.h @@ -81,6 +81,7 @@ class WebServerBase : public Component { return; } this->server_ = std::make_shared(this->port_); + DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*"); this->server_->begin(); for (auto *handler : this->handlers_)