diff --git a/ckan/config/middleware.py b/ckan/config/middleware.py index acd2523f948..c9898fc11ae 100644 --- a/ckan/config/middleware.py +++ b/ckan/config/middleware.py @@ -88,6 +88,8 @@ def make_pylons_stack(conf, full_stack=True, static_files=True, **app_conf): for plugin in PluginImplementations(IMiddleware): app = plugin.make_middleware(app, config) + app = RootPathMiddleware(app, config) + # Routing/Session/Cache Middleware app = RoutesMiddleware(app, config['routes.map']) # we want to be able to retrieve the routes middleware to be able to update @@ -200,8 +202,6 @@ def make_pylons_stack(conf, full_stack=True, static_files=True, **app_conf): if asbool(config.get('ckan.tracking_enabled', 'false')): app = TrackingMiddleware(app, config) - app = RootPathMiddleware(app, config) - return app