INNER CODE UNIT · Python
_get_auth_enabled
CaddyGlow/ccproxy-api · ccproxy/api/app.py:345
def _get_auth_enabled() -> bool:
auth_cfg = getattr(settings, "auth", None)
if auth_cfg is None:
return False
if isinstance(auth_cfg, dict):
return bool(auth_cfg.get("enabled", False))
return bool(getattr(auth_cfg, "enabled", False))
logger.info(
"server_ready",
url=f"http://{settings.server.host}:{settings.server.port}",
version=__version__,
workers=settings.server.workers,
reload=settings.server.reload,
features_enabled={
"plugins": bool(getattr(settings, "enable_plugins", False)),
"metrics": _get_plugin_enabled("metrics"),
"access": _get_plugin_enabled("access_log"),