Skip to content
Snippets Groups Projects
Commit c40ddf18 authored by Adam Mills's avatar Adam Mills Committed by Paulus Schoutsen
Browse files

Fix incorrect caching of /api/error_log (#4789)

parent 9a3fe691
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ from .const import (
KEY_USE_X_FORWARDED_FOR, KEY_TRUSTED_NETWORKS,
KEY_BANS_ENABLED, KEY_LOGIN_THRESHOLD,
KEY_DEVELOPMENT, KEY_AUTHENTICATED)
from .static import GZIP_FILE_SENDER, staticresource_middleware
from .static import FILE_SENDER, GZIP_FILE_SENDER, staticresource_middleware
from .util import get_real_ip
DOMAIN = 'http'
......@@ -344,7 +344,7 @@ class HomeAssistantView(object):
def file(self, request, fil):
"""Return a file."""
assert isinstance(fil, str), 'only string paths allowed'
response = yield from GZIP_FILE_SENDER.send(request, Path(fil))
response = yield from FILE_SENDER.send(request, Path(fil))
return response
def register(self, router):
......
......@@ -63,6 +63,7 @@ class GzipFileSender(FileSender):
GZIP_FILE_SENDER = GzipFileSender()
FILE_SENDER = FileSender()
@asyncio.coroutine
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment