Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 12 additions & 11 deletions app/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,18 @@ async def lifespan(app: FastAPI):
)


# NOTE: Local/core routes are intentionally unauthenticated.
# They are designed for local development and debugging only.
# In production, these should not be exposed to the public internet.
_ = app.include_router(agent_router)
_ = app.include_router(autonomous_router)
_ = app.include_router(chat_router)
_ = app.include_router(lead_router)
_ = app.include_router(content_router)
_ = app.include_router(metadata_router)
_ = app.include_router(schema_router)
_ = app.include_router(wechat_router)
# Local/core routes are unauthenticated — for local development only.
# Guard them behind the ENV setting so they are never registered in production.
_LOCAL_ENVS = {"local", "development", "dev", "test", "testing"}
if config.env.lower() in _LOCAL_ENVS:
_ = app.include_router(agent_router)
_ = app.include_router(autonomous_router)
_ = app.include_router(chat_router)
_ = app.include_router(lead_router)
_ = app.include_router(content_router)
_ = app.include_router(metadata_router)
_ = app.include_router(schema_router)
_ = app.include_router(wechat_router)
_ = app.include_router(core_router)
_ = app.include_router(twitter_callback_router, include_in_schema=False)
_ = app.include_router(twitter_oauth2_router)
Expand Down