问题描述:平常的pdf就这样嵌入就可以预览
<embed src={pdfUrl}></embed>
在chmore 中是完全没有问题的,但是在safari中,如果pdf中含有链接,点击链接的时候就会报错,错误如下:[Error] Refused to display 'https://www.fanaticsinc.com/' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN, SAMEORIGIN'.
解决方法:简单粗暴,增加一个 type=“application/pdf”
<embed src={pdfUrl} type="application/pdf"></embed>