strncpy(auth_user,cfg.getCharValue(F("auth_user")),31);
strncpy(auth_pwd,cfg.getCharValue(F("auth_pwd")),31);
server.on("/action", HTTP_GET, [](AsyncWebServerRequest* request) {
if (auth_user && auth_pwd && auth_user[0] && auth_pwd[0] && !request->authenticate(auth_user, auth_pwd)) {
strncpy(auth_user,cfg.getCharValue(F("auth_user")),31);
strncpy(auth_pwd,cfg.getCharValue(F("auth_pwd")),31);
server.on("/action", HTTP_GET, [](AsyncWebServerRequest* request) {
if (auth_user && auth_pwd && auth_user[0] && auth_pwd[0] && !request->authenticate(auth_user, auth_pwd)) {