fix: align proxy diagnostics with shared web stack
Build and Push Docker Container / build-and-push (push) Failing after 1m54s
Build and Push Docker Container / build-and-push (push) Failing after 1m54s
- Advance quart_common to the same revision used by webside-and-api. - Log loaded proxy trust settings during NanoShare startup. - Make deployed proxy header configuration easier to verify.
This commit is contained in:
@@ -9,6 +9,7 @@ from my_modules.app.constens import SECRET_KEY, THE_IP_BOT_MANAGER
|
||||
from my_modules.OrphanStorageIdRegistry import OrphanStorageIdRegistry
|
||||
from my_modules.AsyncCache import AsyncCache
|
||||
from my_modules.app.logger import logger
|
||||
from quart_common.web.request import TRUST_PROXY_HEADERS, TRUSTED_PROXY_IPS, TRUSTED_PROXY_CIDRS
|
||||
from quart_common.web.wide_event import register_wide_event_logging
|
||||
|
||||
from my_helpers.db.convex.ConvexRuntime import ConvexRuntime
|
||||
@@ -104,6 +105,12 @@ app.orphan_storage_registry = OrphanStorageIdRegistry(
|
||||
|
||||
@app.before_serving
|
||||
async def init_convex():
|
||||
await logger.info(
|
||||
f"Proxy trust config | trust_headers={TRUST_PROXY_HEADERS} "
|
||||
f"trusted_proxy_ips={sorted(TRUSTED_PROXY_IPS)} "
|
||||
f"trusted_proxy_cidrs={[str(network) for network in TRUSTED_PROXY_CIDRS]}"
|
||||
)
|
||||
|
||||
await convex_runtime.start()
|
||||
app.convex = ConvexDB(runtime=convex_runtime)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user