Skip to content

Commit

Permalink
fix of 9a70ce8
Browse files Browse the repository at this point in the history
Co-Authored-By: RyotaK <49341894+Ry0taK@users.noreply.github.com>
  • Loading branch information
syuilo and Ry0taK committed Feb 17, 2024
1 parent 875069c commit 01de151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/core/activitypub/misc/validator.ts
Expand Up @@ -20,7 +20,7 @@ export function validateContentTypeSetAsActivityPub(response: Response): void {
throw new Error('Validate content type of AP response: Content type is not application/activity+json or application/ld+json');
}

const plusJsonSuffixRegex = /(application|text)\/[a-zA-Z0-9\.\-\+]+\+json/;
const plusJsonSuffixRegex = /^\s*(application|text)\/[a-zA-Z0-9\.\-\+]+\+json\s*(;|$)/;

export function validateContentTypeSetAsJsonLD(response: Response): void {
const contentType = (response.headers.get('content-type') ?? '').toLowerCase();
Expand Down

0 comments on commit 01de151

Please sign in to comment.