問題:使用pdf.js雙方跨域
viewer.html?file=http://www.chuanbaofund.com/關於《川寶車厘子自由一號私募證券投資基金》成立的公告.pdf:1 Access to fetch at 'xx/xx.pdf' from origin 'http://127.0.0.1:5500' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
方案:
步驟1:
注釋掉pdf.js里的1846-1848行,先使自己的項目能跨域

步驟2:
服務器設置http:響應頭

但是放到服務器又發現一個問題,pdf.js功能都變成英文了,
所以需要配置以下

引用連接:
https://my.oschina.net/tigerBin/blog/1802998
https://www.cnblogs.com/sharestone/p/7105486.html
