Browse Source

Authenticate /reset endpoint (#1858)

master
foxman69 5 years ago
committed by Max Prokhorov
parent
commit
43a44cf964
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      code/espurna/web.ino

+ 6
- 0
code/espurna/web.ino View File

@ -59,6 +59,12 @@ constexpr const size_t WEB_CONFIG_BUFFER_MAX = 4096;
// -----------------------------------------------------------------------------
void _onReset(AsyncWebServerRequest *request) {
webLog(request);
if (!webAuthenticate(request)) {
return request->requestAuthentication(getSetting("hostname").c_str());
}
deferredReset(100, CUSTOM_RESET_HTTP);
request->send(200);
}


Loading…
Cancel
Save