Change default activity content type
This commit is contained in:
parent
3fc0acd2d1
commit
fc24ba0e59
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,5 @@
|
|||
pub const ACTIVITY_CONTENT_TYPE: &str = "application/activity+json";
|
||||
// https://www.w3.org/TR/activitypub/#server-to-server-interactions
|
||||
pub const ACTIVITY_CONTENT_TYPE: &str = r#"application/ld+json; profile="https://www.w3.org/ns/activitystreams""#;
|
||||
|
||||
pub const AP_CONTEXT: &str = "https://www.w3.org/ns/activitystreams";
|
||||
pub const AP_PUBLIC: &str = "https://www.w3.org/ns/activitystreams#Public";
|
||||
|
|
|
@ -46,8 +46,10 @@ pub fn get_object_url(instance_url: &str, object_uuid: &Uuid) -> String {
|
|||
}
|
||||
|
||||
fn is_activitypub_request(request: &HttpRequest) -> bool {
|
||||
const CONTENT_TYPES: [&str; 3] = [
|
||||
const CONTENT_TYPES: [&str; 5] = [
|
||||
ACTIVITY_CONTENT_TYPE,
|
||||
"application/activity+json, application/ld+json", // Mastodon
|
||||
"application/activity+json",
|
||||
"application/ld+json",
|
||||
"application/json",
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue