This commit is contained in:
tablatronix
2019-08-30 09:14:54 -05:00
parent d1e395e78f
commit 89eb952d18
+7 -8
View File
@@ -143,18 +143,17 @@ void WiFiManager::setupConfigPortal() {
dnsServer->start(DNS_PORT, "*", WiFi.softAPIP());
/* Setup web pages: root, wifi config pages, SO captive portal detectors and not found. */
server->on(String(F("/")), std::bind(&WiFiManager::handleRoot, this));
server->on(String(F("/wifi")), std::bind(&WiFiManager::handleWifi, this, true));
server->on(String(F("/0wifi")), std::bind(&WiFiManager::handleWifi, this, false));
server->on(String(F("/wifisave")), std::bind(&WiFiManager::handleWifiSave, this));
server->on(String(F("/i")), std::bind(&WiFiManager::handleInfo, this));
server->on(String(F("/r")), std::bind(&WiFiManager::handleReset, this));
server->on(String(F("/")).c_str(), std::bind(&WiFiManager::handleRoot, this));
server->on(String(F("/wifi")).c_str(), std::bind(&WiFiManager::handleWifi, this, true));
server->on(String(F("/0wifi")).c_str(), std::bind(&WiFiManager::handleWifi, this, false));
server->on(String(F("/wifisave")).c_str(), std::bind(&WiFiManager::handleWifiSave, this));
server->on(String(F("/i")).c_str(), std::bind(&WiFiManager::handleInfo, this));
server->on(String(F("/r")).c_str(), std::bind(&WiFiManager::handleReset, this));
//server->on("/generate_204", std::bind(&WiFiManager::handle204, this)); //Android/Chrome OS captive portal check.
server->on(String(F("/fwlink")), std::bind(&WiFiManager::handleRoot, this)); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler.
server->on(String(F("/fwlink")).c_str(), std::bind(&WiFiManager::handleRoot, this)); //Microsoft captive portal. Maybe not needed. Might be handled by notFound handler.
server->onNotFound (std::bind(&WiFiManager::handleNotFound, this));
server->begin(); // Web server start
DEBUG_WM(F("HTTP server started"));
}
boolean WiFiManager::autoConnect() {