We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Content Security Policy Issues for Chrome and FireFox

Thread ID:

Created:

Updated:

Platform:

Replies:

150717 Jan 17,2020 12:29 AM UTC Jan 21,2020 09:51 AM UTC ASP.NET MVC - EJ 2 3
loading
Tags: PDF Viewer
Robin Knight
Asked On January 17, 2020 12:29 AM UTC

We are using PDF View to render the Synfusion Word DOCIO reports .  It works locally but when we deploy the application on our dev servers, we get Content Security Policy Issues for Chrome and Fire Fox.

We downloaded the Script and CSS files from the below package :

https://www.nuget.org/packages/Syncfusion.EJ2.JavaScript/   

However if you see material.css, it is refering . 

url("https://fonts.googleapis.com/css?family=Roboto:400,500")

We do not want to refer fonts.googleapis.com/css.. This website refers other website

https://fonts.gstatic.com/s/roboto/v20/KFOmCnqEu92Fr1Mu72xKOzY.woff2) format('woff2');


We tried  referring the Content Security Policy in web.config but that also did not work

Please advice.



Mohan Selvaraj [Syncfusion]
Replied On January 17, 2020 08:57 AM UTC

Hi Robin, 
 
If you wants all the css and fonts in local, please avoid using individual component styles (which will have online roboto font reference). Instead you can use the material.css style file from ej2-material-theme package in the following location ( which does not have reference to online roboto font and contains styles of all the components).  
 
   
 
Using this, we have also created a sample for your reference.  
 
Steps for running the sample,   
1.           Install npm packages (ej2-material-theme for material.css) using following command “npm install”  
2.           Once the installation is complete, open the index.html file in browser.  
 
Please let us know, if you have any concerns. 
 
 
Regards, 
Mohan S 


Robin Knight
Replied On January 21, 2020 02:01 AM UTC

Hi Robin, 
 
If you wants all the css and fonts in local, please avoid using individual component styles (which will have online roboto font reference). Instead you can use the material.css style file from ej2-material-theme package in the following location ( which does not have reference to online roboto font and contains styles of all the components).  
 
   
 
Using this, we have also created a sample for your reference.  
 
Steps for running the sample,   
1.           Install npm packages (ej2-material-theme for material.css) using following command “npm install”  
2.           Once the installation is complete, open the index.html file in browser.  
 
Please let us know, if you have any concerns. 
 
 
Regards, 
Mohan S 


Hi Mohan ,

Thank you for responding back. We do not have admin permission to run npm install for ej2-material-theme for material.css.

Please  send us the local material.css which do not have reference to online roboto font and style  in the same way you have send us sample projects

Thanks 

Akshaya Arivoli [Syncfusion]
Replied On January 21, 2020 09:51 AM UTC

Hi Robin, 

We have shared the local material.css file which do not have reference to online roboto font and style in the below link, 


Please try this and let us know if you have any concerns on this. 

Regards, 
Akshaya 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon