##// END OF EJS Templates
config: Move HttpsFixup middleware up...
johbo -
r181:7237d87b stable
parent child Browse files
Show More
@@ -120,9 +120,6 b' def make_app(global_conf, full_stack=Tru'
120 else:
120 else:
121 app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
121 app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
122
122
123 # enable https redirects based on HTTP_X_URL_SCHEME set by proxy
124 app = HttpsFixup(app, config)
125
126 # Establish the Registry for this application
123 # Establish the Registry for this application
127 app = RegistryManager(app)
124 app = RegistryManager(app)
128
125
@@ -253,8 +250,12 b' def wrap_app_in_wsgi_middlewares(pyramid'
253 """
250 """
254 settings = config.registry.settings
251 settings = config.registry.settings
255
252
253 # enable https redirects based on HTTP_X_URL_SCHEME set by proxy
254 pyramid_app = HttpsFixup(pyramid_app, settings)
255
256 # Add RoutesMiddleware. Currently we have two instances in the stack. This
256 # Add RoutesMiddleware. Currently we have two instances in the stack. This
257 # is the upper one to support the pylons compatibility tween during
257 # is the upper one to support the pylons compatibility tween during
258
258 # migration to pyramid.
259 # migration to pyramid.
259 pyramid_app = RoutesMiddleware(
260 pyramid_app = RoutesMiddleware(
260 pyramid_app, config.registry._pylons_compat_config['routes.map'])
261 pyramid_app, config.registry._pylons_compat_config['routes.map'])
General Comments 0
You need to be logged in to leave comments. Login now