mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2026-01-03 19:33:47 +01:00
Fix: Deny passwordless access to prometheus API if readonly access is disabled
Fix #1358
This commit is contained in:
@@ -25,6 +25,10 @@ void WebApiPrometheusClass::loop()
|
||||
|
||||
void WebApiPrometheusClass::onPrometheusMetricsGet(AsyncWebServerRequest* request)
|
||||
{
|
||||
if (!WebApi.checkCredentialsReadonly(request)) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
auto stream = request->beginResponseStream("text/plain; charset=utf-8", 40960);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user