🎨 Allow overriding base prefix

This commit is contained in:
Brian Wiborg 2025-10-08 13:06:42 +02:00
parent cb9acd52d0
commit f579972466
No known key found for this signature in database

View file

@ -95,6 +95,7 @@ class Project:
Attach project middlewares and routes and event handlers to given
FastAPI instance.
"""
app.router.prefix = getattr(self.settings, "API_PREFIX", "")
# Attach project middlewares and routes.
for app_name, app_def in self._apps.items():
for middleware, kwargs in app_def.middlewares: