From 768bf7b715e43989402494fe56740c44b45c2776 Mon Sep 17 00:00:00 2001 From: jean-baptiste-perez-bib Date: Sat, 6 Jul 2024 19:33:59 +0200 Subject: [PATCH] Fixes API v2 routes unreachable in tests A catch-all route was set in RestApi class before adding API v2 routes. --- app/api/rest_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/rest_api.py b/app/api/rest_api.py index 2d52069d41..146caabe9a 100644 --- a/app/api/rest_api.py +++ b/app/api/rest_api.py @@ -43,7 +43,7 @@ async def enable(self): self.app_svc.application.router.add_route('*', '/api/rest', self.rest_core) self.app_svc.application.router.add_route('GET', '/api/{index}', self.rest_core_info) self.app_svc.application.router.add_route('GET', '/file/download_exfil', self.download_exfil_file) - self.app_svc.application.router.add_route('GET', '/{tail:(?!plugin/).*}', self.handle_catch) + self.app_svc.application.router.add_route('GET', '/{tail:(?!plugin|api/v2/).*}', self.handle_catch) async def validate_login(self, request): return await self.auth_svc.login_user(request)