##// END OF EJS Templates
request-wrapper: ensure we wrap WHOLE request not just logic after http detection.
marcink -
r4157:3d2cea78 default
parent child Browse files
Show More
@@ -428,9 +428,7 b' def sanitize_settings_and_apply_defaults'
428 428 settings['beaker.session.url'] = 'redis://' + raw_url
429 429
430 430 # Default includes, possible to change as a user
431 pyramid_includes = settings.setdefault('pyramid.includes', [
432 'rhodecode.lib.middleware.request_wrapper',
433 ])
431 pyramid_includes = settings.setdefault('pyramid.includes', [])
434 432 log.debug(
435 433 "Using the following pyramid.includes: %s",
436 434 pyramid_includes)
@@ -38,6 +38,7 b' class RequestWrapperTween(object):'
38 38
39 39 def __call__(self, request):
40 40 start = time.time()
41 log.debug('Starting request time measurement')
41 42 try:
42 43 response = self.handler(request)
43 44 finally:
@@ -116,3 +116,6 b' def includeme(config):'
116 116 'pyramid.events.ContextFound')
117 117 config.add_tween('rhodecode.tweens.vcs_detection_tween_factory')
118 118 config.add_tween('rhodecode.tweens.sanity_check_factory')
119
120 # This needs to be the LAST item
121 config.add_tween('rhodecode.lib.middleware.request_wrapper.RequestWrapperTween')
General Comments 0
You need to be logged in to leave comments. Login now