1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-06-11 02:30:39 +00:00

#44 Adding Basic Auth

- Also authing websockets
- Implemented on begin and beginSpiffs
- Added notes to Gui example
This commit is contained in:
2018-12-26 13:38:38 +01:00
parent f31575b50c
commit 7a10457f99
3 changed files with 90 additions and 10 deletions

View File

@ -157,11 +157,19 @@ void setup(void) {
/*
.begin loads and serves all files from PROGMEM directly.
If you want to serve the files from SPIFFS use .beginSPIFFS
If you want to serve the files from SPIFFS use ESPUI.beginSPIFFS
(.prepareFileSystem has to be run in an empty sketch before)
*/
dnsServer.start(DNS_PORT, "*", apIP);
/*
* Optionally you can use HTTP BasicAuth. Keep in mind that this is NOT a
SECURE way of limiting access.
* Anyone who is able to sniff traffic will be able to intercept your password
since it is transmitted in cleartext ESPUI.begin("ESPUI Control", "myuser",
"mypassword");
*/
ESPUI.begin("ESPUI Control");
}