Skip to content
Snippets Groups Projects
Commit 6132bc3b authored by syuilo's avatar syuilo Committed by dakkar
Browse files
parent fef7a7b9
No related branches found
No related tags found
2 merge requests!486bump `devel` version,!425import upstream ssrf fix on our stable
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment