mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 09:17:10 +00:00
Fix incorrect caching of /api/error_log (#4789)
This commit is contained in:
parent
9a3fe691b1
commit
c40ddf18c7
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user