mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-26 00:21:27 +00:00
#44 Adding define to reenable WS BasicAuth
This commit is contained in:
parent
7a10457f99
commit
98d1215d7a
@ -681,6 +681,7 @@ void ESPUIClass::beginSPIFFS(const char *_title, const char *username,
|
|||||||
basicAuthPassword = password;
|
basicAuthPassword = password;
|
||||||
basicAuthUsername = username;
|
basicAuthUsername = username;
|
||||||
basicAuth = true;
|
basicAuth = true;
|
||||||
|
if (WS_AUTHENTICATION)
|
||||||
ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword);
|
ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword);
|
||||||
server->serveStatic("/", SPIFFS, "/")
|
server->serveStatic("/", SPIFFS, "/")
|
||||||
.setDefaultFile("index.htm")
|
.setDefaultFile("index.htm")
|
||||||
@ -737,6 +738,7 @@ void ESPUIClass::begin(const char *_title, const char *username,
|
|||||||
basicAuthPassword = password;
|
basicAuthPassword = password;
|
||||||
basicAuthUsername = username;
|
basicAuthUsername = username;
|
||||||
basicAuth = true;
|
basicAuth = true;
|
||||||
|
if (WS_AUTHENTICATION)
|
||||||
ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword);
|
ws->setAuthentication(this->basicAuthUsername, this->basicAuthPassword);
|
||||||
|
|
||||||
} else if (basicAuth) {
|
} else if (basicAuth) {
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define ESPUI_h
|
#define ESPUI_h
|
||||||
|
|
||||||
#define DEBUG_ESPUI true
|
#define DEBUG_ESPUI true
|
||||||
|
#define WS_AUTHENTICATION false
|
||||||
|
|
||||||
#include "Arduino.h"
|
#include "Arduino.h"
|
||||||
#include "ArduinoJson.h"
|
#include "ArduinoJson.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user