fix: DDNS URL env var takes priority; switch default to HTTPS
- ddns_manager: DDNS_URL env var overrides stored api_base_url so existing cells pick up the new HTTPS endpoint without re-registering - docker-compose.yml: default DDNS_URL now points to https://ddns.pic.ngo - setup_manager.py: add rstrip('/') before replacing /api/v1 to handle URLs with or without trailing slash Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -344,7 +344,9 @@ class DDNSManager(BaseServiceManager):
|
||||
return None
|
||||
|
||||
if provider_name == 'pic_ngo':
|
||||
api_base = ddns_cfg.get('api_base_url')
|
||||
# Env var takes priority so deployments can switch URLs without re-registering
|
||||
_env_url = os.environ.get('DDNS_URL', '').replace('/api/v1', '').rstrip('/')
|
||||
api_base = _env_url or ddns_cfg.get('api_base_url')
|
||||
totp_secret = ddns_cfg.get('totp_secret') or os.environ.get('DDNS_TOTP_SECRET', '')
|
||||
return PicNgoDDNS(api_base_url=api_base, totp_secret=totp_secret)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user