From 9a5b7dd061761fbd104c38c86b4f2843f7488983 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Thu, 2 Apr 2026 20:01:55 +0200 Subject: [PATCH] fix: register hosting public preview route + suppress SSL warnings - Register hosting public page router in main.py (POC preview at /hosting/sites/{id}/preview was returning 404 because the public_page_router was set on module definition but never mounted) - Suppress urllib3 InsecureRequestWarning in enrichment service (intentional verify=False for prospect site scanning) Co-Authored-By: Claude Opus 4.6 (1M context) --- .../prospecting/services/enrichment_service.py | 4 ++++ main.py | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/app/modules/prospecting/services/enrichment_service.py b/app/modules/prospecting/services/enrichment_service.py index 250ec3fb..942aa3a7 100644 --- a/app/modules/prospecting/services/enrichment_service.py +++ b/app/modules/prospecting/services/enrichment_service.py @@ -16,6 +16,10 @@ import ssl from datetime import UTC, datetime import requests +import urllib3 + +# Suppress SSL warnings for intentional verify=False on prospect sites # noqa: SEC047 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) # noqa: SEC047 from sqlalchemy.orm import Session from app.modules.prospecting.config import config diff --git a/main.py b/main.py index 128dca0d..92e2c873 100644 --- a/main.py +++ b/main.py @@ -491,6 +491,23 @@ for route_info in storefront_page_routes: ) +# ============================================================================= +# HOSTING PUBLIC PAGES (POC preview) +# ============================================================================= +try: + from app.modules.hosting.routes.pages.public import router as hosting_public_router + + app.include_router( + hosting_public_router, + prefix="", + tags=["hosting-public"], + include_in_schema=False, + ) + logger.info("Registered hosting public page routes") +except ImportError: + pass # Hosting module not installed + + # ============================================================================ # PLATFORM ROUTING (via PlatformContextMiddleware) #