1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-12-23 00:40:49 +00:00

#44 Adding define to reenable WS BasicAuth

This commit is contained in:
Lukas Bachschwell 2018-12-27 11:34:28 +01:00
parent 7a10457f99
commit 98d1215d7a
2 changed files with 5 additions and 2 deletions

View File

@ -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(

View File

@ -2,6 +2,7 @@
#define ESPUI_h
#define DEBUG_ESPUI true
#define WS_AUTHENTICATION false
#include "Arduino.h"
#include "ArduinoJson.h"