Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #73 from markotibold/middleware-fix

Only process html and xhtml responses in the middleware
Thanks @markotibold
  • Loading branch information...
commit 597bca27ba8038a930109a942aaa6b08ee29a4e7 2 parents cf42a61 + b1ad3ad
@dbunskoek dbunskoek authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  fiber/middleware.py
View
3  fiber/middleware.py
@@ -25,6 +25,9 @@ def __init__(self):
self.editor_settings = self.get_editor_settings()
def process_response(self, request, response):
+ # only process html and xhtml responses
+ if response['Content-Type'].split(';')[0] not in ('text/html', 'application/xhtml+xml'):
+ return response
if self.set_login_session(request, response):
request.session['show_fiber_admin'] = True
url_without_fiber = request.path_info.replace('@fiber', '')
Please sign in to comment.
Something went wrong with that request. Please try again.