renaming properly all middleware test cases and fixing bugs

This commit is contained in:
2025-11-19 21:21:29 +01:00
parent 21bd390685
commit 92a2610b70
11 changed files with 740 additions and 517 deletions

View File

@@ -18,6 +18,7 @@ from sqlalchemy import func
from starlette.middleware.base import BaseHTTPMiddleware
from fastapi import Request
from app.core.config import settings
from app.core.database import get_db
from models.database.vendor import Vendor
from models.database.vendor_domain import VendorDomain
@@ -49,7 +50,6 @@ class VendorContextManager:
# Method 1: Custom domain detection (HIGHEST PRIORITY)
# Check if this is a custom domain (not platform.com and not localhost)
from app.core.config import settings
platform_domain = getattr(settings, 'platform_domain', 'platform.com')
is_custom_domain = (