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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
17
main.py
17
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)
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user