work-in-progress atproto PDS
typescript atproto pds atcute
at trunk 21 lines 911 B view raw
1diff --git a/dist/api/well-known.js b/dist/api/well-known.js 2index e03a123ad88c236d6b213eb0797c56371dae01b5..26043c819e2422352a71372af425896650c4e245 100644 3--- a/dist/api/well-known.js 4+++ b/dist/api/well-known.js 5@@ -1,13 +1,13 @@ 6 "use strict"; 7 Object.defineProperty(exports, "__esModule", { value: true }); 8 exports.createRouter = void 0; 9+const did_1 = require("@atproto/did"); 10 const express_1 = require("express"); 11 const createRouter = (ctx) => { 12 const router = (0, express_1.Router)(); 13 const did = ctx.cfg.serverDid; 14- if (did.startsWith('did:web:')) { 15- const hostname = did.slice('did:web:'.length); 16- const serviceEndpoint = `https://${hostname}`; 17+ if ((0, did_1.isDidWeb)(did)) { 18+ const serviceEndpoint = (0, did_1.didWebToUrl)(did).origin; 19 router.get('/.well-known/did.json', (_req, res) => { 20 res.json({ 21 '@context': [