Skip to content

Commit

Permalink
fix content-types issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
src-r-r committed Nov 19, 2018
1 parent 0de8bb1 commit 55555f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion livesync/core/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __call__(self, request):

@staticmethod
def process_response(request, response):
if settings.DEBUG and 'text/html' in response['Content-Type']:
if settings.DEBUG and 'text/html' in response.get('Content-Type', ''):
script_settings = """
<script type='text/javascript'>
window.DJANGO_LIVESYNC = {{'HOST': '{host}', 'PORT': {port} }}
Expand Down

1 comment on commit 55555f6

@jmcannon
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! Ran into this myself. Nice one mate.

Please sign in to comment.