-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic open browser after connect to AP to load index.html saved on the SPIFFS #53
Comments
I can not understand your issue. What's the problem and what you want to do? |
Thanks @Hieromon . Non of AutoConnect Examples is able to automatically load index.html once connected to SoftAP so I am looking for help and I can ignore AsyncWebserver and use WebServer. I want simplify procedure for the user to just open SSID and automatically index.html pops like Airport webpage without typing the IP and load index.html file from SPIFFS. |
I still cannot understand your request well.
It is just using to the captive portal and You can mimic the DNS example of ESP8266. |
There is no response and the topic has no relation with AutoConnect. Close. |
I really having difficulty to have a automatic loading index.html saved on the SPIFFS. I need to automatically open index.html without user require open browser and type the IP.
server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
Serial.println("/");
Serial.println("redirecting to /index.html");
request->redirect("/index.html");
});
#if ESP8266
if(!SPIFFS.begin()){
Serial.println("SPIFFS Mount Failed");
}
#endif
#if ESP32
if(!SPIFFS.begin(true)){
Serial.println("SPIFFS Mount Failed on ..");
}
#endif
listDir(SPIFFS, "/", 0);
server.serveStatic("/", SPIFFS, "/").setCacheControl("max-age=600").setDefaultFile("index.html");
server.begin();
Thank you
The text was updated successfully, but these errors were encountered: