s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266
https://valencia.lbsfilm.at/midterm-presentation/
Other
923 stars 174 forks source link

Add captive portal functionality, update examples and documentation, resolves #134 #197

Closed ncmreynolds closed 2 years ago

ncmreynolds commented 2 years ago

I have made a small change to optionally redirect all 404s to the 'root' of the ESP, turning it into a captive portal if acting as a Wi-Fi hotspot and DNS server.

This PR includes changes to the examples and documentation to reflect this. Sorry for the long wait in my producing a complete solution to #134 I got absentminded and forgot about it until I worked on another project with ESPUI. The existing examples can already act as Wi-Fi hotspot and DNS server so the changes to them are one line.

s00500 commented 2 years ago

hey @ncmreynolds, thanks for the PR Just one comment: Why make this off by default ? I would argue that we can always have this redirect :-)

ncmreynolds commented 2 years ago

I left it off default because it is probably not very useful when the ESP is acting as a station not a hotspot. Having said that having it on by default most likely wouldn't have any negative effect. Feel free to change this if you wish.

s00500 commented 2 years ago

Please make the change, then lets merge it :-)

ncmreynolds commented 2 years ago

Done (I think, I'm not great with git)

ncmreynolds commented 2 years ago

Suggestions done, also updated the documentation change to reflect this.

s00500 commented 2 years ago

Great, thanks a lot :-)