diff --git a/Allura/allura/lib/custom_middleware.py b/Allura/allura/lib/custom_middleware.py index 6c121b4..5b2d4e9 100644 --- a/Allura/allura/lib/custom_middleware.py +++ b/Allura/allura/lib/custom_middleware.py @@ -94,7 +94,9 @@ def __call__(self, environ, start_response): status, headers, app_iter, exc_info = call_wsgi_application( self.app, environ, catch_exc_info=True) is_api_request = environ.get('PATH_INFO', '').startswith('/rest/') - if status[:3] == '401' and not is_api_request: + is_service_request = '/service-' in environ.get('PATH_INFO', '') + do_not_show_login = is_api_request or is_service_request + if status[:3] == '401' and not do_not_show_login: login_url = tg.config.get('auth.login_url', '/auth/') if environ['REQUEST_METHOD'] == 'GET': return_to = environ['PATH_INFO']