From ad096ba3d5ade37338c3ece56ddf752dd5e78079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sat, 25 Nov 2017 11:04:59 +0100 Subject: [PATCH] Add realm to auth challenge --- code/espurna/web.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/web.ino b/code/espurna/web.ino index e1f56867..c9a27202 100644 --- a/code/espurna/web.ino +++ b/code/espurna/web.ino @@ -36,7 +36,7 @@ char _last_modified[50]; void _onGetConfig(AsyncWebServerRequest *request) { webLog(request); - if (!_authenticate(request)) return request->requestAuthentication(); + if (!_authenticate(request)) return request->requestAuthentication(getSetting("hostname").c_str()); AsyncJsonResponse * response = new AsyncJsonResponse(); JsonObject& root = response->getRoot(); @@ -63,7 +63,7 @@ void _onGetConfig(AsyncWebServerRequest *request) { void _onHome(AsyncWebServerRequest *request) { webLog(request); - if (!_authenticate(request)) return request->requestAuthentication(); + if (!_authenticate(request)) return request->requestAuthentication(getSetting("hostname").c_str()); if (request->header("If-Modified-Since").equals(_last_modified)) { @@ -163,7 +163,7 @@ int _onCertificate(void * arg, const char *filename, uint8_t **buf) { void _onUpgrade(AsyncWebServerRequest *request) { webLog(request); - if (!_authenticate(request)) return request->requestAuthentication(); + if (!_authenticate(request)) return request->requestAuthentication(getSetting("hostname").c_str()); char buffer[10]; if (!Update.hasError()) {