1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

[web_server] Use oi.esphome.io for css and js assets (#10296)

This commit is contained in:
Clyde Stubbs
2025-08-25 07:04:32 +10:00
committed by GitHub
parent 9f02575287
commit 456c31262d
2 changed files with 4 additions and 4 deletions

View File

@@ -52,9 +52,9 @@ def default_url(config: ConfigType) -> ConfigType:
config = config.copy()
if config[CONF_VERSION] == 1:
if CONF_CSS_URL not in config:
config[CONF_CSS_URL] = "https://esphome.io/_static/webserver-v1.min.css"
config[CONF_CSS_URL] = "https://oi.esphome.io/v1/webserver-v1.min.css"
if CONF_JS_URL not in config:
config[CONF_JS_URL] = "https://esphome.io/_static/webserver-v1.min.js"
config[CONF_JS_URL] = "https://oi.esphome.io/v1/webserver-v1.min.js"
if config[CONF_VERSION] == 2:
if CONF_CSS_URL not in config:
config[CONF_CSS_URL] = ""

View File

@@ -173,14 +173,14 @@ class WebServer : public Controller, public Component, public AsyncWebHandler {
#if USE_WEBSERVER_VERSION == 1
/** Set the URL to the CSS <link> that's sent to each client. Defaults to
* https://esphome.io/_static/webserver-v1.min.css
* https://oi.esphome.io/v1/webserver-v1.min.css
*
* @param css_url The url to the web server stylesheet.
*/
void set_css_url(const char *css_url);
/** Set the URL to the script that's embedded in the index page. Defaults to
* https://esphome.io/_static/webserver-v1.min.js
* https://oi.esphome.io/v1/webserver-v1.min.js
*
* @param js_url The url to the web server script.
*/