mirror of
https://github.com/tbnobody/OpenDTU.git
synced 2025-12-18 16:20:41 +01:00
Implement readonly security for API endpoints
This commit is contained in:
@@ -28,6 +28,10 @@ void WebApiMqttClass::loop()
|
||||
|
||||
void WebApiMqttClass::onMqttStatus(AsyncWebServerRequest* request)
|
||||
{
|
||||
if (!WebApi.checkCredentialsReadonly(request)) {
|
||||
return;
|
||||
}
|
||||
|
||||
AsyncJsonResponse* response = new AsyncJsonResponse(false, MQTT_JSON_DOC_SIZE);
|
||||
JsonObject root = response->getRoot();
|
||||
const CONFIG_T& config = Configuration.get();
|
||||
|
||||
Reference in New Issue
Block a user