feat: 接入可选字体包同源渲染链
This commit is contained in:
@@ -117,7 +117,10 @@ export function isAllowedPdfRuntimeUrl(
|
||||
if (["about:", "blob:", "data:"].includes(requested.protocol)) {
|
||||
return true;
|
||||
}
|
||||
if (requested.protocol === "mdpdf:" && requested.host === "theme") {
|
||||
if (
|
||||
requested.protocol === "mdpdf:" &&
|
||||
["theme", "font-pack"].includes(requested.host)
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
return requested.origin === new URL(renderUrl).origin;
|
||||
|
||||
Reference in New Issue
Block a user