···12 match status with
13 | `OK ->
14 let%lwt did = Body.to_string body in
15- Lwt.return_ok did
000016 | _ ->
17 let%lwt () = Body.drain_body body in
18 Lwt.return_error "failed to resolve"
···12 match status with
13 | `OK ->
14 let%lwt did = Body.to_string body in
15+ if
16+ String.starts_with ~prefix:"did:plc:" did
17+ || String.starts_with ~prefix:"did:web:" did
18+ then Lwt.return_ok did
19+ else Lwt.return_error "invalid did in .well-known/atproto-did"
20 | _ ->
21 let%lwt () = Body.drain_body body in
22 Lwt.return_error "failed to resolve"