Issue loading media when RENDER_DEPENDENCIES True

This commit is contained in:
Rafael P 2022-07-31 20:18:41 -05:00
parent 84ae5fb4bd
commit dcbe0bccd1

View file

@ -32,7 +32,7 @@ class ComponentDependencyMiddleware:
"RENDER_DEPENDENCIES", False
)
and not isinstance(response, StreamingHttpResponse)
and response["Content-Type"].startswith("text/html")
and response.get("Content-Type", "").startswith("text/html")
):
response.content = process_response_content(response.content)
return response