mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-25 15:35:12 +00:00
fix of 9a70ce8f5e
Co-Authored-By: RyotaK <49341894+Ry0taK@users.noreply.github.com>
This commit is contained in:
parent
0a8ffd9cfa
commit
7562d233c5
1 changed files with 1 additions and 1 deletions
|
@ -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');
|
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 {
|
export function validateContentTypeSetAsJsonLD(response: Response): void {
|
||||||
const contentType = (response.headers.get('content-type') ?? '').toLowerCase();
|
const contentType = (response.headers.get('content-type') ?? '').toLowerCase();
|
||||||
|
|
Loading…
Reference in a new issue