Skip to content

Commit

Permalink
Authenticate /reset endpoint (#1858)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxman69 authored and mcspr committed Aug 15, 2019
1 parent b100d5f commit 43a44cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/espurna/web.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 43a44cf

Please sign in to comment.