Compare commits

..

No commits in common. "7de39f49f80050a23e3a203ba3ded0bdce093656" and "428398991bbc7ae4dc5af1745f9578146918dca5" have entirely different histories.

7
app.py
View file

@ -1557,10 +1557,9 @@ async def caddy_site_remove(hostname: str, _=Depends(_verify), dry_run: bool = Q
async def _hetzner_zone_and_rrsets(zone_name: str): async def _hetzner_zone_and_rrsets(zone_name: str):
try: token = _read("HETZNER_DNS_TOKEN")
token = await asyncio.to_thread(_get_hetzner_dns_token) if not token:
except RuntimeError as exc: raise HTTPException(503, "HETZNER_DNS_TOKEN unavailable in Butler vault cache")
raise HTTPException(503, str(exc))
headers = {"Authorization": f"Bearer {token}"} headers = {"Authorization": f"Bearer {token}"}
async with httpx.AsyncClient(timeout=30) as client: async with httpx.AsyncClient(timeout=30) as client:
zones_response = await client.get(f"{HETZNER_DNS_API}/zones", headers=headers, params={"name": zone_name}) zones_response = await client.get(f"{HETZNER_DNS_API}/zones", headers=headers, params={"name": zone_name})