allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] allura git commit: [#7787] move "outer" middleware to be fully outside everything
Date Thu, 20 Nov 2014 18:17:31 GMT
Repository: allura
Updated Branches:
  refs/heads/master f66f754ee -> 88b9926e7


[#7787] move "outer" middleware to be fully outside everything


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/4d7b4d4d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/4d7b4d4d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/4d7b4d4d

Branch: refs/heads/master
Commit: 4d7b4d4d27eb92dcc9c4f586f6aa0b2463b6d123
Parents: 25b8733
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Tue Nov 18 02:28:42 2014 +0000
Committer: Igor Bondarenko <jetmind2@gmail.com>
Committed: Thu Nov 20 07:42:34 2014 +0000

----------------------------------------------------------------------
 Allura/allura/config/middleware.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/4d7b4d4d/Allura/allura/config/middleware.py
----------------------------------------------------------------------
diff --git a/Allura/allura/config/middleware.py b/Allura/allura/config/middleware.py
index 1a7beb8..840a39c 100644
--- a/Allura/allura/config/middleware.py
+++ b/Allura/allura/config/middleware.py
@@ -169,11 +169,6 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
     #    the WSGI application's iterator is exhausted
     app = RegistryManager(app, streaming=True)
 
-    for mw_ep in h.iter_entry_points('allura.middleware'):
-        Middleware = mw_ep.load()
-        if getattr(Middleware, 'when', 'inner') == 'outer':
-            app = Middleware(app, config)
-
     # "task" wsgi would get a 2nd request to /error/document if we used this middleware
     if config.get('override_root') != 'task':
         # Converts exceptions to HTTP errors, shows traceback in debug mode
@@ -188,6 +183,12 @@ def _make_core_app(root, global_conf, full_stack=True, **app_conf):
         else:
             app = StatusCodeRedirect(
                 app, base_config.handle_status_codes + [500])
+
+    for mw_ep in h.iter_entry_points('allura.middleware'):
+        Middleware = mw_ep.load()
+        if getattr(Middleware, 'when', 'inner') == 'outer':
+            app = Middleware(app, config)
+
     return app
 
 


Mime
View raw message