# HG changeset patch # User RhodeCode Admin # Date 2023-05-11 09:54:54 # Node ID 5e247eb332b752e01051ad37a5a0ce2e9a455791 # Parent fb2e3b36afab0c655ca8f8ed09b8514062ab57c5 tweens: use explicit position of measuring tween diff --git a/rhodecode/tweens.py b/rhodecode/tweens.py --- a/rhodecode/tweens.py +++ b/rhodecode/tweens.py @@ -20,6 +20,8 @@ import logging + +import pyramid.tweens from pyramid.httpexceptions import HTTPException, HTTPBadRequest from rhodecode.lib.middleware.vcs import ( @@ -37,6 +39,7 @@ def vcs_detection_tween_factory(handler, this information """ vcs_server_enabled = request.registry.settings.get('vcs.server.enable') + vcs_handler = vcs_server_enabled and detect_vcs_request( request.environ, request.registry.settings.get('vcs.backends')) @@ -120,5 +123,5 @@ def includeme(config): config.add_tween('rhodecode.tweens.sanity_check_factory') # This needs to be the LAST item - config.add_tween('rhodecode.lib.middleware.request_wrapper.RequestWrapperTween') + config.add_tween('rhodecode.lib.middleware.request_wrapper.RequestWrapperTween', under=pyramid.tweens.INGRESS) log.debug('configured all tweens')