pdfjs跨域问题

当使用外部域名时提示Uncaught (in promise) Error: file origin does not match viewer's…… 修改viewer.js

代码语言:javascript
复制
// 跨域问题注释掉解决
if (origin !== viewerOrigin && protocol !== 'blob:') {
     //throw new Error('file origin does not match viewer\'s');
}