mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-26 04:37:14 +02:00
fix night communication enable
improved different WiFi connection scenarios (STA WiFi not found, reconnect #509, redirect for AP to configuration)
This commit is contained in:
parent
07bf947ff7
commit
de4c572ee2
10 changed files with 171 additions and 164 deletions
|
@ -285,20 +285,10 @@ class Web {
|
|||
}
|
||||
|
||||
void showNotFound(AsyncWebServerRequest *request) {
|
||||
DPRINTLN(DBG_VERBOSE, F("showNotFound - ") + request->url());
|
||||
String msg = F("File Not Found\n\nURL: ");
|
||||
msg += request->url();
|
||||
msg += F("\nMethod: ");
|
||||
msg += ( request->method() == HTTP_GET ) ? "GET" : "POST";
|
||||
msg += F("\nArguments: ");
|
||||
msg += request->args();
|
||||
msg += "\n";
|
||||
|
||||
for(uint8_t i = 0; i < request->args(); i++ ) {
|
||||
msg += " " + request->argName(i) + ": " + request->arg(i) + "\n";
|
||||
}
|
||||
|
||||
request->send(404, F("text/plain"), msg);
|
||||
if(mProtected)
|
||||
request->redirect("/login");
|
||||
else
|
||||
request->redirect("/setup");
|
||||
}
|
||||
|
||||
void onReboot(AsyncWebServerRequest *request) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue