Skip to content

Commit

Permalink
Fix accidentally removed LittleFS static route
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc committed Oct 18, 2023
1 parent 6589559 commit 0c0fae7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/CaptivePortalInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ CaptivePortalInstance::CaptivePortalInstance() : m_webServer(HTTP_PORT), m_socke
m_socketServer.begin();
m_socketServer.enableHeartbeat(WEBSOCKET_PING_INTERVAL, WEBSOCKET_PING_TIMEOUT, WEBSOCKET_PING_RETRIES);

m_socketServer.serveStatic("/", LittleFS, "/www/").setDefaultFile("index.html");

m_webServer.onNotFound([](AsyncWebServerRequest* request) { request->send(404, "text/plain", "Not found"); });
m_webServer.begin();
}
Expand Down

0 comments on commit 0c0fae7

Please sign in to comment.