Skip to content
Snippets Groups Projects
Unverified Commit 549ff6dd authored by J. Nick Koston's avatar J. Nick Koston Committed by GitHub
Browse files

Enable compression on frontend index page (#108148)

parent 09234ca3
No related branches found
No related tags found
No related merge requests found
......@@ -610,7 +610,8 @@ class IndexView(web_urldispatcher.AbstractResource):
else:
extra_modules = hass.data[DATA_EXTRA_MODULE_URL].urls
extra_js_es5 = hass.data[DATA_EXTRA_JS_URL_ES5].urls
return web.Response(
response = web.Response(
text=_async_render_index_cached(
template,
theme_color=MANIFEST_JSON["theme_color"],
......@@ -619,6 +620,8 @@ class IndexView(web_urldispatcher.AbstractResource):
),
content_type="text/html",
)
response.enable_compression()
return response
def __len__(self) -> int:
"""Return length of resource."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment