From 76439498b860508208855e271d2275222bfaf982 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Mon, 27 Sep 2010 17:47:54 +0200 Subject: [PATCH] add chrome frame middleware --- oxdjango/middleware.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oxdjango/middleware.py b/oxdjango/middleware.py index 8c95b3e..8d13690 100644 --- a/oxdjango/middleware.py +++ b/oxdjango/middleware.py @@ -4,9 +4,12 @@ from shortcuts import HttpErrorJson, render_to_json_response class ExceptionMiddleware(object): - def process_exception(self, request, exception): if isinstance(exception, HttpErrorJson): return render_to_json_response(exception.response) return None +class ChromeFrameMiddleware(object): + def process_response(self, request, response): + response['X-UA-Compatible'] = 'chrome=1' + return response