diff --git a/src/ESPUI.cpp b/src/ESPUI.cpp index 7344b90..898095f 100644 --- a/src/ESPUI.cpp +++ b/src/ESPUI.cpp @@ -681,7 +681,8 @@ void ESPUIClass::beginSPIFFS(const char *_title, const char *username, basicAuthPassword = password; basicAuthUsername = username; basicAuth = true; - ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword); + if (WS_AUTHENTICATION) + ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword); server->serveStatic("/", SPIFFS, "/") .setDefaultFile("index.htm") .setAuthentication(ESPUI.basicAuthUsername, ESPUI.basicAuthPassword); @@ -737,7 +738,8 @@ void ESPUIClass::begin(const char *_title, const char *username, basicAuthPassword = password; basicAuthUsername = username; basicAuth = true; - ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword); + if (WS_AUTHENTICATION) + ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword); } else if (basicAuth) { Serial.println( diff --git a/src/ESPUI.h b/src/ESPUI.h index 0fddd4a..fe04e31 100644 --- a/src/ESPUI.h +++ b/src/ESPUI.h @@ -2,6 +2,7 @@ #define ESPUI_h #define DEBUG_ESPUI true +#define WS_AUTHENTICATION false #include "Arduino.h" #include "ArduinoJson.h"