-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
@EtoTen thanks, slight change, Might have to add ipv6 detection instead and handle it that way
- Loading branch information
1 parent
465b44d
commit 5a8e869
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2416,6 +2416,16 @@ boolean WiFiManager::captivePortal() { | |
if(!_enableCaptivePortal) return false; // skip redirections, @todo maybe allow redirection even when no cp ? might be useful | ||
|
||
String serverLoc = toStringIp(server->client().localIP()); | ||
|
||
// fallback for ipv6 bug | ||
if(serverloc = 0.0.0.0){ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ayavilevich
|
||
if ((WiFi.status()) != WL_CONNECTED) | ||
serverLoc = toStringIp(WiFi.softAPIP()); | ||
else | ||
serverLoc = toStringIp(WiFi.localIP()); | ||
} | ||
} | ||
|
||
if(_httpPort != 80) serverLoc += ":" + (String)_httpPort; // add port if not default | ||
bool doredirect = serverLoc != server->hostHeader(); // redirect if hostheader not server ip, prevent redirect loops | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Not valid.