Multitenant implementation with custom Domain, theme per vendor

This commit is contained in:
2025-10-26 20:05:02 +01:00
parent 091067a729
commit c88775134d
27 changed files with 3267 additions and 838 deletions

View File

@@ -22,6 +22,7 @@ from app.core.database import get_db
from app.core.lifespan import lifespan
from app.exceptions.handler import setup_exception_handlers
from app.exceptions import ServiceUnavailableException
from middleware.theme_context import theme_context_middleware
from middleware.vendor_context import vendor_context_middleware
logger = logging.getLogger(__name__)
@@ -57,6 +58,9 @@ app.add_middleware(
# Add vendor context middleware (must be after CORS)
app.middleware("http")(vendor_context_middleware)
# Add theme context middleware (must be after vendor context)
app.middleware("http")(theme_context_middleware)
# ========================================
# MOUNT STATIC FILES - Use absolute path
# ========================================