From ec4c4aefab32ca67450e121c6f766604d68b944f Mon Sep 17 00:00:00 2001 From: dawn Date: Tue, 22 Sep 2026 17:17:42 +0300 Subject: [PATCH] sites: wire config-change deploys to sitesd Signed-off-by: dawn --- sites/src/xrpc.rs | 15 ++++++++++++--- sites/wrangler.dev.toml | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/sites/src/xrpc.rs b/sites/src/xrpc.rs index 0b3ca6c69..11bd2c9fd 100644 --- a/sites/src/xrpc.rs +++ b/sites/src/xrpc.rs @@ -356,9 +356,18 @@ async fn handle_update_site_config( let Ok(request) = Request::new_with_init(&url, &init) else { return; }; - if let Err(e) = Fetch::Request(request).send().await { - console_warn!("updateSiteConfig: deploy trigger failed: {}", e); - } + match Fetch::Request(request).send().await { + Ok(res) if res.status_code() >= 300 => { + console_warn!( + "updateSiteConfig: deploy trigger rejected: HTTP {}", + res.status_code() + ); + } + Ok(_) => {} + Err(e) => { + console_warn!("updateSiteConfig: deploy trigger failed: {}", e); + } + } }); } else { console_warn!("updateSiteConfig: SITES_SD_URL is not set; config-change deploys are disabled"); diff --git a/sites/wrangler.dev.toml b/sites/wrangler.dev.toml index 7c9d2a966..87122983f 100644 --- a/sites/wrangler.dev.toml +++ b/sites/wrangler.dev.toml @@ -32,5 +32,5 @@ migrations_dir = "migrations" SITES_ALLOWED_TLDS = "tngl.io,tngl.sh" SITES_AUDIENCE_DID = "did:web:sites.tngl.boltless.dev" SITES_SD_DID = "did:key:zDnaeg9UkMwsCRgMWXhSc6cn2VUfBLoypo3sRx4GovnUUA6e8" -SITES_PLC_URL = "http://127.0.0.1:8085" -SITES_SD_URL = "http://127.0.0.1:8086" +SITES_PLC_URL = "http://plc:8080" +SITES_SD_URL = "http://sitesd:8081" -- 2.51.2