@@ -591,14 +591,14 @@ void notFound()
591591 if (settings.enableCaptivePortal == true && knownCaptiveUrl (webServer->uri ()) == true )
592592 {
593593 String logmessage = " Known captive URI: " + webServer->client ().remoteIP ().toString () + " " + webServer->uri ();
594- Serial. println (logmessage);
595- webServer->sendHeader (" Location" , " /portal " );
596- webServer->send (302 , " text/plain" , " Redirect to captive portal " );
594+ systemPrintln (logmessage);
595+ webServer->sendHeader (" Location" , " /" );
596+ webServer->send (302 , " text/plain" , " Redirect to Web Config " );
597597 return ;
598598 }
599599
600600 String logmessage = " notFound: " + webServer->client ().remoteIP ().toString () + " " + webServer->uri ();
601- Serial. println (logmessage);
601+ systemPrintln (logmessage);
602602 webServer->send (404 , " text/plain" , " Not found" );
603603}
604604
@@ -621,22 +621,6 @@ bool knownCaptiveUrl(String uri)
621621 return false ;
622622}
623623
624- void respondWithPortal ()
625- {
626- Serial.println (" \r\n Send portal page" );
627-
628- String response = " <!DOCTYPE html><html><head><title>RTK Config</title></head><body>" ;
629- response += " <div class='container'>" ;
630- response += " <div align='center' class='col-sm-12'><img src='http://" ;
631- response += WiFi.softAPIP ().toString ();
632- response += " /src/rtk-setup.png' alt='SparkFun RTK WiFi Setup'></div>" ;
633- response += " <div align='center'><h3>Configure your RTK receiver <a href='http://" ;
634- response += WiFi.softAPIP ().toString ();
635- response += " /'>here</a></h3></div>" ;
636- response += " </div></body></html>" ;
637- webServer->send (200 , " text/html" , response);
638- }
639-
640624// ----------------------------------------
641625// Break CSV into setting constituents
642626// Can't use strtok because we may have two commas next to each other, ie
@@ -894,13 +878,6 @@ bool webServerAssignResources(int httpPort = 80)
894878 GET_PAGE (" /src/fonts/icomoon.ttf" , " text/plain" , icomoon_ttf);
895879 GET_PAGE (" /src/fonts/icomoon.woof" , " text/plain" , icomoon_woof);
896880
897- // Handler for captive portal page
898- if (settings.enableCaptivePortal == true )
899- {
900- Serial.println (" \r\n Setting portal" );
901- webServer->on (" /portal" , []() { respondWithPortal (); });
902- }
903-
904881 // Handler for the /uploadFile form POST
905882 webServer->on (
906883 " /uploadFile" , HTTP_POST, []() { webServer->send (200 , " text/plain" , " " ); },
0 commit comments