Some changes to make it compile for both ESP8266 and ESP32

This commit is contained in:
Gunnar Skjold
2020-01-28 18:17:20 +01:00
parent 50faaca559
commit 3312f88804
3 changed files with 7 additions and 4 deletions

View File

@@ -107,7 +107,7 @@ void HanConfigAp::handleRoot() {
configuration *config = new configuration();
config->load();
String html = CONFIG_HTML;
String html = String((const __FlashStringHelper*) CONFIG_HTML);
if(config->hasConfig()) {
bool access = !config->isAuth();
@@ -201,10 +201,12 @@ void HanConfigAp::handleRoot() {
void HanConfigAp::handleStyle() {
println("Serving /style.css over http...");
String css = String((const __FlashStringHelper*) STYLE_CSS);
server.sendHeader("Cache-Control", "no-cache, no-store, must-revalidate");
server.sendHeader("Pragma", "no-cache");
server.sendHeader("Expires", "-1");
server.send(200, "text/html", STYLE_CSS, sizeof(STYLE_CSS));
server.send(200, "text/css", css);
}
void HanConfigAp::handleSave() {