add back NTP

This commit is contained in:
proddy
2026-04-19 13:14:54 +02:00
parent 539e6ed080
commit bbb086ea41

View File

@@ -6,7 +6,7 @@
static constexpr const char CACHE_CONTROL[] = "public,max-age=60";
// Single static-content handler serving all assets embedded in WWWData.h.
// Single static-content handler serving all assets embedded in WWWData.h
class StaticContentHandler : public AsyncWebHandler {
public:
bool canHandle(AsyncWebServerRequest * request) const override {
@@ -15,8 +15,7 @@ class StaticContentHandler : public AsyncWebHandler {
}
void handleRequest(AsyncWebServerRequest * request) override {
// OPTIONS is handled generically - the server-level CORS headers are
// attached via DefaultHeaders in ESP32React::begin().
// OPTIONS is handled generically - the server-level CORS headers are attached via DefaultHeaders in ESP32React::begin().
if (request->method() == HTTP_OPTIONS) {
request->send(200);
return;
@@ -57,8 +56,7 @@ class StaticContentHandler : public AsyncWebHandler {
}
// Returns the /index.html asset, used as the SPA fallback for any GET
// that didn't match an embedded asset (React Router handles routing on
// the client side).
// that didn't match an embedded asset (React Router handles routing on the client side).
static const WWWAsset * index_asset() {
static const WWWAsset * cached = nullptr;
if (cached == nullptr) {
@@ -106,4 +104,5 @@ void ESP32React::loop() {
_networkSettingsService.loop();
_apSettingsService.loop();
_mqttSettingsService.loop();
_ntpSettingsService.loop();
}