diff --git a/mkdocs/api.md b/mkdocs/api.md index 9bcaa11..22b5fe0 100644 --- a/mkdocs/api.md +++ b/mkdocs/api.md @@ -15,6 +15,7 @@ #define AUTOCONNECT_AP_GW 0x01F4A8C0 // Default SoftAP Gateway IP #define AUTOCONNECT_AP_NM 0x00FFFFFF // Default subnet mask #define AUTOCONNECT_DNSPORT 53 // Default DNS port at captive portal +#define AUTOCONNECT_HTTPPORT 80 // Default HTTP #define AUTOCONNECT_MENU_TITLE "AutoConnect" // Default AutoConnect menu title #define AUTOCONNECT_STARTUPTIME 10 // Default waiting time[s] for after reset #define AUTOCONNECT_URI "/_ac" // Default AutoConnect root path diff --git a/src/AutoConnect.cpp b/src/AutoConnect.cpp index 77aa666..e4c5b87 100644 --- a/src/AutoConnect.cpp +++ b/src/AutoConnect.cpp @@ -231,7 +231,7 @@ void AutoConnect::_startWebServer() { // Boot Web server if (!_webServer) { // Only when hosting WebServer internally - _webServer.reset(new ESP8266WebServer(80)); + _webServer.reset(new ESP8266WebServer(AUTOCONNECT_HTTPPORT)); _webServerAlloc = AC_WEBSERVER_HOSTED; AC_DBG("ESP8266WebServer allocated\n"); } diff --git a/src/AutoConnect.h b/src/AutoConnect.h index 8abc043..0a34e61 100644 --- a/src/AutoConnect.h +++ b/src/AutoConnect.h @@ -84,8 +84,12 @@ extern "C" { #define AUTOCONNECT_STARTUPTIME 10 #endif +#ifndef AUTOCONNECT_HTTPPORT +#define AUTOCONNECT_HTTPPORT 80 +#endif + #ifndef AUTOCONNECT_DNSPORT -#define AUTOCONNECT_DNSPORT 53 +#define AUTOCONNECT_DNSPORT 53 #endif /**< A type to save established credential at WiFi.begin automatically. */