fix: webfinger request should not request ld+json
This commit is contained in:
parent
21cde13f96
commit
6edb379578
1 changed files with 5 additions and 3 deletions
|
@ -86,9 +86,11 @@ impl Fetcher for Context {
|
||||||
async fn webfinger(&self, user: &str, host: &str) -> crate::Result<String> {
|
async fn webfinger(&self, user: &str, host: &str) -> crate::Result<String> {
|
||||||
let subject = format!("acct:{user}@{host}");
|
let subject = format!("acct:{user}@{host}");
|
||||||
let webfinger_uri = format!("https://{host}/.well-known/webfinger?resource={subject}");
|
let webfinger_uri = format!("https://{host}/.well-known/webfinger?resource={subject}");
|
||||||
let resource = Self::request(
|
let resource = reqwest::Client::new()
|
||||||
Method::GET, &webfinger_uri, None, &self.base(), &self.app().private_key, self.domain(),
|
.get(webfinger_uri)
|
||||||
)
|
.header(ACCEPT, "application/jrd+json")
|
||||||
|
.header(USER_AGENT, format!("upub+{VERSION} ({})", self.domain()))
|
||||||
|
.send()
|
||||||
.await?
|
.await?
|
||||||
.json::<jrd::JsonResourceDescriptor>()
|
.json::<jrd::JsonResourceDescriptor>()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
Loading…
Reference in a new issue