[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:
authored and GitHub committed 2026-08-01 07:30:26 -05:00
1 parent f76d04b613
commit a33010c068
1 file changed
+2 -1
+2 -1
View File
@@ -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