Mirror from bluesky-social/pds

fix tls check

Changed files
+6 -3
service
+1 -1
installer.sh
··· 306 306 { 307 307 email ${PDS_ADMIN_EMAIL} 308 308 on_demand_tls { 309 - ask http://localhost:3000/check-handle 309 + ask http://localhost:3000/tls-check 310 310 } 311 311 } 312 312
+5 -2
service/index.js
··· 16 16 const pds = await PDS.create(cfg, secrets); 17 17 await pds.start(); 18 18 httpLogger.info("pds has started"); 19 - pds.app.get("/check-handle", (req, res) => { 19 + pds.app.get("/tls-check", (req, res) => { 20 20 checkHandleRoute(pds, req, res); 21 21 }); 22 22 // Graceful shutdown (see also https://aws.amazon.com/blogs/containers/graceful-shutdowns-with-ecs/) ··· 40 40 message: "bad or missing domain query param", 41 41 }); 42 42 } 43 + if (domain === pds.ctx.cfg.service.hostname) { 44 + return res.json({ success: true }); 45 + } 43 46 const isHostedHandle = pds.ctx.cfg.identity.serviceHandleDomains.find( 44 47 (avail) => domain.endsWith(avail) 45 48 ); ··· 56 59 message: "handle not found for this domain", 57 60 }); 58 61 } 59 - return res.json({ did: account.did, handle: account.handle }); 62 + return res.json({ success: true }); 60 63 } catch (err) { 61 64 httpLogger.error({ err }, "check handle failed"); 62 65 return res.status(500).json({