From 1caaa08f7853f3529c2a9442b1a53b312f40af64 Mon Sep 17 00:00:00 2001 From: alemi Date: Sat, 13 Apr 2024 04:21:33 +0200 Subject: [PATCH] fix: fetcher specifies application/json --- src/server/fetcher.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/fetcher.rs b/src/server/fetcher.rs index 3d81ccc3..47e00413 100644 --- a/src/server/fetcher.rs +++ b/src/server/fetcher.rs @@ -1,6 +1,6 @@ use base64::Engine; use openssl::{hash::MessageDigest, pkey::{PKey, Private}, sign::Signer}; -use reqwest::{header::{CONTENT_TYPE, USER_AGENT}, Method, Response}; +use reqwest::{header::{ACCEPT, CONTENT_TYPE, USER_AGENT}, Method, Response}; use sea_orm::{DatabaseConnection, EntityTrait, IntoActiveModel}; use crate::{model, VERSION}; @@ -37,6 +37,7 @@ impl Fetcher { let mut client = reqwest::Client::new() .request(method, url) + .header(ACCEPT, "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") .header(CONTENT_TYPE, "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"") .header(USER_AGENT, format!("upub+{VERSION} ({domain})")) .header("Host", host.clone())