[FIX] Restore GET route for /wi so the WiFi scan link works (#2345)
handleWI() dispatches internally on the "scan" query arg, so the same handler serves both the scan link and the save form. #2037 narrowed the route to POST-only, which orphaned the scan hyperlink (a GET) in config_WebContent.h. Re-register /wi for HTTP_GET alongside HTTP_POST; the credential Save form stays method=post, so no secrets move to GET. Co-authored-by: Florian <1technophile@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 file changed
+2
-1
+2
-1
@@ -1820,7 +1820,8 @@ void WebUISetup() {
|
||||
server.on("/up", handleUP); // Firmware Upgrade
|
||||
# endif
|
||||
server.on("/cn", handleCN); // Configuration
|
||||
server.on("/wi", HTTP_POST, handleWI); // Configure Wifi
|
||||
server.on("/wi", HTTP_GET, handleWI); // Scan for WiFi networks (GET link)
|
||||
server.on("/wi", HTTP_POST, handleWI); // Configure Wifi (save form, POST)
|
||||
server.on("/mq", HTTP_POST, handleMQ); // Configure MQTT
|
||||
# ifndef ESPWifiManualSetup
|
||||
server.on("/cg", handleCG); // Configure gateway
|
||||
|
||||
Reference in new issue
Block a user