我在项目中有一个代码。我需要读取文件字,我使用了docs.google.com/viewer来读取文件。
if (rs.d != "false") {
var url = "https://docs.google.com/viewer?url=https://saigontourist.vnptioffice.vn/Vm01d2RFQXhNak09/Lichcongtac/File_Test_20190515081111312310.docx&embedded=true";
$("#viewdocument").attr("src", url);
$("#lblthongbao").html("");
}
--------
And
<system.webserver>
<httpProtocol>
<customHeaders>
<add name="Content-Security-Policy" value="script-src * data: https://docs.google.com 'unsafe-inline' 'unsafe-eval' http:;
child-src https://docs.google.com " />
</customHeaders>
</httpProtocol>
</system.webServer>