add back security

This commit is contained in:
proddy
2025-10-28 22:19:20 +01:00
parent 3abfb7bb9c
commit 9504723ef2

View File

@@ -32,6 +32,9 @@ WebLogService::WebLogService(AsyncWebServer * server, SecurityManager * security
[this](AsyncWebServerRequest * request, JsonVariant json) { getSetValues(request, json); }, [this](AsyncWebServerRequest * request, JsonVariant json) { getSetValues(request, json); },
HTTP_ANY); HTTP_ANY);
// Add authentication filter to EventSource
// EventSource (SSE) cannot use custom headers, so authentication is done via URL parameter
events_.setFilter(securityManager->filterRequest(AuthenticationPredicates::IS_AUTHENTICATED));
server->addHandler(&events_); server->addHandler(&events_);
} }