Skip to content

Commit

Permalink
Fix Safari not displaying the config bundle HTML page (Fix #476) (#502)
Browse files Browse the repository at this point in the history
* Fix Safari not displaying the config bundle HTML page

Safari cannot deal with gzip files that have a "*.gz" file extension.
Simply faking the filename solves the problem though.
  • Loading branch information
timpur authored Mar 19, 2018
1 parent 95d9566 commit b7b6776
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Homie/Boot/BootConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,7 @@ void BootConfig::_onCaptivePortal(AsyncWebServerRequest *request) {
} else if (request->url() == "/" && SPIFFS.exists(CONFIG_UI_BUNDLE_PATH)) {
// Respond with UI
Interface::get().getLogger() << F("UI bundle found") << endl;
AsyncWebServerResponse *response = request->beginResponse(SPIFFS, CONFIG_UI_BUNDLE_PATH, F("text/html"));
response->addHeader("Content-Encoding", "gzip");
AsyncWebServerResponse *response = request->beginResponse(SPIFFS.open(CONFIG_UI_BUNDLE_PATH, "r"), F("index.html"), F("text/html"));
request->send(response);
} else {
// Faild to find request
Expand Down

0 comments on commit b7b6776

Please sign in to comment.