[web_server][captive_portal] Add Brotli compression (saves ~11KB flash when using local) (#12959)
This commit is contained in:
1 parent
e29523e248
commit
1339f3e77e
11 files changed
+8961
-4773
No files matched your search
@@ -422,7 +422,11 @@ void WebServer::handle_index_request(AsyncWebServerRequest *request) {
|
||||
#else
|
||||
AsyncWebServerResponse *response = request->beginResponse_P(200, "text/html", INDEX_GZ, sizeof(INDEX_GZ));
|
||||
#endif
|
||||
#ifdef USE_WEBSERVER_GZIP
|
||||
response->addHeader(ESPHOME_F("Content-Encoding"), ESPHOME_F("gzip"));
|
||||
#else
|
||||
response->addHeader(ESPHOME_F("Content-Encoding"), ESPHOME_F("br"));
|
||||
#endif
|
||||
request->send(response);
|
||||
}
|
||||
#elif USE_WEBSERVER_VERSION >= 2
|
||||
|
||||
Reference in new issue
Block a user