]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Create a wsgi factory method for Debug filter.
authorSteve Baker <sbaker@redhat.com>
Sun, 17 Mar 2013 20:21:35 +0000 (09:21 +1300)
committerSteve Baker <sbaker@redhat.com>
Sun, 17 Mar 2013 20:38:34 +0000 (09:38 +1300)
This can be enabled by putting the following in the *-paste.ini
file:
[filter:debug]
paste.filter_factory = heat.common.wsgi:filter_factory
heat.filter_factory = heat.common.wsgi:debug_filter

and adding 'debug' to the pipeline.

This assisted with bug #1133792

Change-Id: I4c2d3194ac9673d095b4115d4b6f385fd2f4fa4e

heat/common/wsgi.py

index 74183c5037f81dc1c8453268de795c5a119c86b0..7ce8d7a8d9037e721787c657afef3293f04dea9e 100644 (file)
@@ -343,6 +343,10 @@ class Debug(Middleware):
         print
 
 
+def debug_filter(app, conf, **local_conf):
+    return Debug(app)
+
+
 class Router(object):
     """
     WSGI middleware that maps incoming requests to WSGI apps.