|
|
@ -257,6 +257,9 @@ class Web { |
|
|
|
|
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), update_html, update_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -311,6 +314,9 @@ class Web { |
|
|
|
|
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), index_html, index_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -350,6 +356,9 @@ class Web { |
|
|
|
else |
|
|
|
response = request->beginResponse_P(200, F("text/css"), colorBright_css, colorBright_css_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -358,6 +367,9 @@ class Web { |
|
|
|
mLogoutTimeout = LOGOUT_TIMEOUT; |
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/css"), style_css, style_css_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -366,6 +378,9 @@ class Web { |
|
|
|
|
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/javascript"), api_js, api_js_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -431,6 +446,9 @@ class Web { |
|
|
|
|
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), setup_html, setup_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -606,6 +624,9 @@ class Web { |
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), visualization_html, visualization_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
response->addHeader(F("content-type"), "text/html; charset=UTF-8"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
|
|
|
|
request->send(response); |
|
|
|
} |
|
|
@ -614,6 +635,9 @@ class Web { |
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), about_html, about_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
response->addHeader(F("content-type"), "text/html; charset=UTF-8"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
|
|
|
|
request->send(response); |
|
|
|
} |
|
|
@ -632,6 +656,9 @@ class Web { |
|
|
|
|
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), serial_html, serial_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
@ -643,6 +670,9 @@ class Web { |
|
|
|
|
|
|
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), system_html, system_html_len); |
|
|
|
response->addHeader(F("Content-Encoding"), "gzip"); |
|
|
|
if(request->hasParam("v")) { |
|
|
|
response->addHeader(F("Cache-Control"), F("max-age=604800")); |
|
|
|
} |
|
|
|
request->send(response); |
|
|
|
} |
|
|
|
|
|
|
|