From 93d56cc105f23b94986adc689043f4cbfe897a06 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 18 Feb 2024 13:12:30 -0600 Subject: [PATCH] Enable compression on error log api (#110865) --- homeassistant/components/api/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/api/__init__.py b/homeassistant/components/api/__init__.py index 38d791d0dda..ad162d143dd 100644 --- a/homeassistant/components/api/__init__.py +++ b/homeassistant/components/api/__init__.py @@ -472,7 +472,9 @@ class APIErrorLog(HomeAssistantView): async def get(self, request: web.Request) -> web.FileResponse: """Retrieve API error log.""" hass: HomeAssistant = request.app[KEY_HASS] - return web.FileResponse(hass.data[DATA_LOGGING]) + response = web.FileResponse(hass.data[DATA_LOGGING]) + response.enable_compression() + return response async def async_services_json(hass: HomeAssistant) -> list[dict[str, Any]]: