Hello,
The following code results in a security warning in my browser. Any idea how to fix. Also, I tried using an <object> tag instead but the problem there is upon loading the pdf multiple times in my modal window it tells me the contact was loaded insecurely. So I guess I have to use the iframe approach but this warning is annoying.
Warning: Refused to apply a stylesheet because its hash, its nonce, or 'unsafe-inline' appears in neither the style-src directive nor the default-src directive of the Content Security Policy.
Approach # 2: (This works on the first modal window load, but if I open the modal again I get the error below.
Error
The resource was requested insecurely.
The following code results in a security warning in my browser. Any idea how to fix. Also, I tried using an <object> tag instead but the problem there is upon loading the pdf multiple times in my modal window it tells me the contact was loaded insecurely. So I guess I have to use the iframe approach but this warning is annoying.
HTML Code:
<iframe id="iframe-pdf" class="iframe-pdf" frameborder="0" style="margin: 0px; height: 900px; width: 100%; opacity: 1" src="/?entryPoint=download&id={{{attachmentId}}}"></iframe>
Approach # 2: (This works on the first modal window load, but if I open the modal again I get the error below.
HTML Code:
<object data="/?entryPoint=download&id={{{attachmentId}}}" type="application/pdf" width="100%" height="900px">alt : <a target="_BLANK" href="/?entryPoint=download&id={{{attachentId}}}">View PDF</a></object>
The resource was requested insecurely.
Comment