XS5FAAN46G4BLUIFVKX5FJEX5H6SDPH3F35QO4E6PPOP4A6XQ7VAC
WLWTNO4YJ4VBMJYVTP2LGPFQAJTOB524BD5INJFA44X2FKAX76DQC
DNFB7TNICXFHRGPNZTT2I4VQNBPGVA2HQMUJWLNEPHF2M4SRZ3SQC
EVP2FSBHQUCAXQ6IIMBD6IS24ODKHP6HFWYCHIMYG6KOFRQG3RVQC
WVHXYKCVPKAFVMXBEMD3IHG54RKOIDSOCVNR3OIPEZQG36IGYJZQC
HZDCKIXQ3LCD7YPL7ZZBCRMD7YMKDJ2QAALETTG3FYMBF4TNFUBAC
4MZ4VIR7FU3PQ3WKJI6TJIKYOIIBODFEPKLMQ32S4AKPZSDFO6AQC
use actix_web::{web, HttpResponse};
use crate::WebData;
pub async fn host_meta(data: web::Data<WebData<'_>>) -> HttpResponse {
HttpResponse::Ok()
.insert_header(("Content-Type", "application/xrd+xml"))
.insert_header((
"Date",
chrono::Utc::now()
.format("%a, %d %b %Y %H:%M:%S GMT")
.to_string(),
))
.body(format!(r#"<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Link rel="lrdd" type="application/xrd+xml" template="{}://{}/.well-known/webfinger?resource={{uri}}"/>
</XRD>
"#, data.base_proto, data.base_domain))
}