diff --git a/src/modules/example-apps/index.ts b/src/modules/example-apps/index.ts index 519e3d8..0083c86 100644 --- a/src/modules/example-apps/index.ts +++ b/src/modules/example-apps/index.ts @@ -38,6 +38,11 @@ import { createServer as createWikiExplorerServer } from '@modelcontextprotocol/ import { LAZY_AUTH_SLUG } from './lazy-auth.js'; +// pdf.js inflates images with the native DecompressionStream, and falls back to +// its own JavaScript inflate when that global is missing. Remove it so PDFs +// from arbitrary URLs are only decompressed in JavaScript. +Reflect.deleteProperty(globalThis, 'DecompressionStream'); + declare module "express-serve-static-core" { interface Request { auth?: AuthInfo;