Skip to content

Commit

Permalink
Fixes API v2 routes unreachable in tests
Browse files Browse the repository at this point in the history
A catch-all route was set in RestApi class before adding API v2
routes.
  • Loading branch information
jean-baptiste-perez-bib committed Jul 6, 2024
1 parent c2f6f5f commit 768bf7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/rest_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 768bf7b

Please sign in to comment.