mirror of
https://github.com/django/daphne.git
synced 2025-04-20 16:52:03 +03:00
Increase FileResponse chunk size for staticfiles handler
This commit is contained in:
parent
61b8940e99
commit
b129adf4a4
|
@ -49,7 +49,10 @@ class StaticFilesHandler(AsgiHandler):
|
|||
|
||||
if self._should_handle(request.path):
|
||||
try:
|
||||
return self.serve(request)
|
||||
response = self.serve(request)
|
||||
# Increase FileResponse block sizes so they're not super slow
|
||||
response.block_size = 1024 * 256
|
||||
return response
|
||||
except Http404 as e:
|
||||
if settings.DEBUG:
|
||||
from django.views import debug
|
||||
|
|
Loading…
Reference in New Issue
Block a user