comparison rhodecode/config/middleware.py @ 1534:72c3cea0175a beta

fixes problem with basic auth and pushes
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 08 Oct 2011 15:19:28 +0200
parents f4fed0b32103
children 752b0a7b7679 2d85e969d78a
comparison
equal deleted inserted replaced
1533:c0e6057543ff 1534:72c3cea0175a
49 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares) 49 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
50 if asbool(config['pdebug']): 50 if asbool(config['pdebug']):
51 from rhodecode.lib.profiler import ProfilingMiddleware 51 from rhodecode.lib.profiler import ProfilingMiddleware
52 app = ProfilingMiddleware(app) 52 app = ProfilingMiddleware(app)
53 53
54
55 # we want our low level middleware to get to the request ASAP. We don't
56 # need any pylons stack middleware in them
57 app = SimpleHg(app, config)
58 app = SimpleGit(app, config)
59
54 if asbool(full_stack): 60 if asbool(full_stack):
55 # Handle Python exceptions 61 # Handle Python exceptions
56 app = ErrorHandler(app, global_conf, **config['pylons.errorware']) 62 app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
57 63
58 # Display error documents for 401, 403, 404 status codes (and 64 # Display error documents for 401, 403, 404 status codes (and
72 # Serve static files 78 # Serve static files
73 static_app = StaticURLParser(config['pylons.paths']['static_files']) 79 static_app = StaticURLParser(config['pylons.paths']['static_files'])
74 app = Cascade([static_app, app]) 80 app = Cascade([static_app, app])
75 app = make_gzip_middleware(app, global_conf, compress_level=1) 81 app = make_gzip_middleware(app, global_conf, compress_level=1)
76 82
77 # we want our low level middleware to get to the request ASAP. We don't
78 # need any pylons stack middleware in them
79 app = SimpleHg(app, config)
80 app = SimpleGit(app, config)
81 83
82 app.config = config 84 app.config = config
83 85
84 return app 86 return app