From 85664ec6c27ac190e7b5f3ecbb8af255a129d194 Mon Sep 17 00:00:00 2001 From: Spacehuhn Date: Tue, 21 Jul 2020 18:16:18 +0200 Subject: [PATCH] Fixed captive portal setting --- esp8266_deauther/A_config.h | 2 +- esp8266_deauther/wifi.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/esp8266_deauther/A_config.h b/esp8266_deauther/A_config.h index 1b90c7c..8a82912 100644 --- a/esp8266_deauther/A_config.h +++ b/esp8266_deauther/A_config.h @@ -527,7 +527,7 @@ // ===== WEB INTERFACE ===== // #define WEB_ENABLED true - #define WEB_CAPTIVE_PORTAL true + #define WEB_CAPTIVE_PORTAL false #define WEB_USE_SPIFFS false #define DEFAULT_LANG "en" diff --git a/esp8266_deauther/wifi.cpp b/esp8266_deauther/wifi.cpp index b2e7bfc..644fff9 100644 --- a/esp8266_deauther/wifi.cpp +++ b/esp8266_deauther/wifi.cpp @@ -396,9 +396,8 @@ namespace wifi { // use it to load content from SPIFFS server.onNotFound([] () { if (!handleFileRead(server.uri())) { - server.send(404, str(W_TXT), str(W_FILE_NOT_FOUND)); - //server.send(200, "text/html", indexhtml); - //sendProgmem(indexhtml, sizeof(indexhtml), W_HTML); + if(settings::getWebSettings().captive_portal) sendProgmem(indexhtml, sizeof(indexhtml), W_HTML); + else server.send(404, str(W_TXT), str(W_FILE_NOT_FOUND)); } });