🎨 Allow overriding base prefix
This commit is contained in:
parent
cb9acd52d0
commit
f579972466
1 changed files with 1 additions and 0 deletions
|
|
@ -95,6 +95,7 @@ class Project:
|
||||||
Attach project middlewares and routes and event handlers to given
|
Attach project middlewares and routes and event handlers to given
|
||||||
FastAPI instance.
|
FastAPI instance.
|
||||||
"""
|
"""
|
||||||
|
app.router.prefix = getattr(self.settings, "API_PREFIX", "")
|
||||||
# Attach project middlewares and routes.
|
# Attach project middlewares and routes.
|
||||||
for app_name, app_def in self._apps.items():
|
for app_name, app_def in self._apps.items():
|
||||||
for middleware, kwargs in app_def.middlewares:
|
for middleware, kwargs in app_def.middlewares:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue