From 4c087612d8783df3cd0e08a1d205262b11c5baef Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Mon, 10 Jan 2022 06:28:38 -0500 Subject: [PATCH] mqtt: allow internal access to API endpoints Signed-off-by: Eric Callahan --- moonraker/components/mqtt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moonraker/components/mqtt.py b/moonraker/components/mqtt.py index 3df4728..571d049 100644 --- a/moonraker/components/mqtt.py +++ b/moonraker/components/mqtt.py @@ -192,11 +192,11 @@ class MQTTClient(APITransport, Subscribable): self.server.register_endpoint( "/server/mqtt/publish", ["POST"], self._handle_publish_request, - transports=["http", "websocket"]) + transports=["http", "websocket", "internal"]) self.server.register_endpoint( "/server/mqtt/subscribe", ["POST"], self._handle_subscription_request, - transports=["http", "websocket"]) + transports=["http", "websocket", "internal"]) # Subscribe to API requests self.json_rpc = JsonRPC(transport="MQTT")