···1212 match status with
1313 | `OK ->
1414 let%lwt did = Body.to_string body in
1515- Lwt.return_ok did
1515+ if
1616+ String.starts_with ~prefix:"did:plc:" did
1717+ || String.starts_with ~prefix:"did:web:" did
1818+ then Lwt.return_ok did
1919+ else Lwt.return_error "invalid did in .well-known/atproto-did"
1620 | _ ->
1721 let%lwt () = Body.drain_body body in
1822 Lwt.return_error "failed to resolve"