Skip to content

Commit

Permalink
added potential fix for captive portal
Browse files Browse the repository at this point in the history
  • Loading branch information
andysheen committed Oct 1, 2020
1 parent 81c6392 commit 840c4f8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions captivePortal.ino
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ class CaptiveRequestHandler : public AsyncWebHandler {
}
else if (request->url().endsWith("connecttest.txt") || request->url().endsWith("ncsi.txt")) {
request->send(200, "text/plain", "Microsoft NCSI");
} else if (strstr(request->url().c_str(), "generate_204_") != NULL) {
Serial.println("you must be huawei!");
sendFile(request, "/index.html");
}
else {
request->send(304);
Expand Down

0 comments on commit 840c4f8

Please sign in to comment.