forked from alemi/upub
fix: fetcher specifies application/json
This commit is contained in:
parent
2031d8de41
commit
1caaa08f78
1 changed files with 2 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue