Skip to content

Commit

Permalink
atproto did
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Mar 8, 2024
1 parent 0b63189 commit 8210038
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/atproto.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use axum::http::HeaderMap;

pub async fn did() -> (HeaderMap, String) {
let mut resp_header = HeaderMap::new();
resp_header.insert("Content-Type", "text/plain".parse().unwrap());
resp_header.insert("Access-Control-Allow-Origin", "*".parse().unwrap());
let did = String::from("did:plc:excwqwknn6u3eel2frn42eqm");
(resp_header, did)
}
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ mod webring;
mod pgp;
mod ssh;
mod security;
mod atproto;

async fn health() -> Html<String> {
Html(String::from("OK"))
Expand Down Expand Up @@ -101,6 +102,7 @@ async fn main() {
.route("/.well-known/openpgpkey/hu/policy", get(pgp::policy))
.route("/.well-known/openpgpkey/hu/s8y7oh5xrdpu9psba3i5ntk64ohouhga", get(pgp::pubkey))
.route("/.well-known/security.txt", get(security::securitytxt))
.route("/.well-known/atproto-did", get(atproto::did))
.route("/ssh", get(ssh::sshpub))
.fallback(site::not_found::not_found)
.with_state(state);
Expand Down

0 comments on commit 8210038

Please sign in to comment.