Merge branch 'master' of https://git.efi.th-nuernberg.de/gitea/schmidtsi76327/ESP8266_Treppenlicht
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "index.html.gz.h"
|
||||
#include "style.css.gz.h"
|
||||
#include "favicon.png.gz.h"
|
||||
// images are possible
|
||||
// maybe check out FS <- SPIFFS
|
||||
|
||||
@@ -43,6 +44,11 @@ void handleCssGz() {
|
||||
server.sendHeader(F("Content-Encoding"), F("gzip"));
|
||||
server.send(200, dataType, (const char*)style_css_gz, style_css_gz_len);
|
||||
}
|
||||
void handleFaviconGz() {
|
||||
const char* dataType = "image/png";
|
||||
server.sendHeader(F("Content-Encoding"), F("gzip"));
|
||||
server.send(200, dataType, (const char*)favicon_png_gz, favicon_png_gz_len);
|
||||
}
|
||||
|
||||
void handleNotFound() {
|
||||
digitalWrite(led, 1);
|
||||
@@ -83,6 +89,7 @@ void setup_webserver() {
|
||||
|
||||
server.on("/", handleRootGz);
|
||||
server.on("/style.css", handleCssGz);
|
||||
server.on("/favicon.png", handleFaviconGz);
|
||||
server.onNotFound(handleNotFound);
|
||||
|
||||
server.begin();
|
||||
|
||||
Reference in New Issue
Block a user