From a6492cc7bbf7270084c7dc88e4e8ffa7d6c8d964 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Thu, 9 Jan 2020 11:09:34 +0100 Subject: [PATCH] Set body size for Proxy / streams to 16mb (#30608) --- homeassistant/components/http/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/http/__init__.py b/homeassistant/components/http/__init__.py index c720d134c9f..0d93461f90f 100644 --- a/homeassistant/components/http/__init__.py +++ b/homeassistant/components/http/__init__.py @@ -54,6 +54,8 @@ DEFAULT_DEVELOPMENT = "0" DEFAULT_CORS = "https://cast.home-assistant.io" NO_LOGIN_ATTEMPT_THRESHOLD = -1 +MAX_CLIENT_SIZE: int = 1024 ** 2 * 16 + HTTP_SCHEMA = vol.Schema( { @@ -188,7 +190,9 @@ class HomeAssistantHTTP: ssl_profile, ): """Initialize the HTTP Home Assistant server.""" - app = self.app = web.Application(middlewares=[]) + app = self.app = web.Application( + middlewares=[], client_max_size=MAX_CLIENT_SIZE + ) app[KEY_HASS] = hass # This order matters