|
@ -19,7 +19,7 @@ |
|
|
//#define STASPSK "mypassword"
|
|
|
//#define STASPSK "mypassword"
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
IPAddress apIP(192, 168, 4, 1); |
|
|
IPAddress apIP(8, 8, 8, 8); |
|
|
const char* ssid = STASSID; |
|
|
const char* ssid = STASSID; |
|
|
//const char* password = STAPSK;
|
|
|
//const char* password = STAPSK;
|
|
|
|
|
|
|
|
@ -46,7 +46,7 @@ |
|
|
//redirect all traffic to index.html
|
|
|
//redirect all traffic to index.html
|
|
|
server.onNotFound([]() { |
|
|
server.onNotFound([]() { |
|
|
if(!handleFileRead(server.uri())){ |
|
|
if(!handleFileRead(server.uri())){ |
|
|
const char *metaRefreshStr = "<head><meta http-equiv=\"refresh\" content=\"0; url=http://192.168.4.1/index.html\" /></head><body><p>redirecting...</p></body>"; |
|
|
const char *metaRefreshStr = "<head><meta http-equiv=\"refresh\" content=\"0; url=http://8.8.8.8/index.html\" /></head><body><p>redirecting...</p></body>"; |
|
|
server.send(200, "text/html", metaRefreshStr); |
|
|
server.send(200, "text/html", metaRefreshStr); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|