From e2bd5aa684d644d92a2f2e65d4f8d51bc6898120 Mon Sep 17 00:00:00 2001 From: Kyle Huang Junyuan Date: Mon, 22 Jul 2024 14:36:03 +0800 Subject: [PATCH] fix: accept application/ld+json when fetching context --- src/3.0/validate/validate.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/3.0/validate/validate.ts b/src/3.0/validate/validate.ts index 38a46b77..59faf5c5 100644 --- a/src/3.0/validate/validate.ts +++ b/src/3.0/validate/validate.ts @@ -56,7 +56,7 @@ const documentLoader = async (url: string) => { for (const url of preloadedContextList) { contexts.set( url, - fetch(url, { headers: { accept: "application/json" } }).then((res: any) => res.json()) + fetch(url, { headers: { accept: "application/json, application/ld+json" } }).then((res: any) => res.json()) ); } }