A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

add atproto-did endpoint

+13 -1
+13 -1
pkg/hold/pds/xrpc.go
··· 68 68 mux.HandleFunc("/xrpc/com.atproto.repo.uploadBlob", corsMiddleware(h.HandleUploadBlob)) 69 69 mux.HandleFunc("/xrpc/com.atproto.sync.getBlob", corsMiddleware(h.HandleGetBlob)) 70 70 71 - // DID document 71 + // DID document and handle resolution 72 72 mux.HandleFunc("/.well-known/did.json", corsMiddleware(h.HandleDIDDocument)) 73 + mux.HandleFunc("/.well-known/atproto-did", corsMiddleware(h.HandleAtprotoDID)) 73 74 } 74 75 75 76 // HandleHealth returns health check information ··· 364 365 w.Header().Set("Content-Type", "application/did+json") 365 366 json.NewEncoder(w).Encode(doc) 366 367 } 368 + 369 + // HandleAtprotoDID returns the DID for handle resolution 370 + func (h *XRPCHandler) HandleAtprotoDID(w http.ResponseWriter, r *http.Request) { 371 + if r.Method != http.MethodGet { 372 + http.Error(w, "method not allowed", http.StatusMethodNotAllowed) 373 + return 374 + } 375 + 376 + w.Header().Set("Content-Type", "text/plain") 377 + fmt.Fprint(w, h.pds.DID()) 378 + }