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. Image for the cookie policy date
close icon

Content Security Policy Issues for Chrome and FireFox

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.



3 Replies

MS Mohan Selvaraj Syncfusion Team 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 



RK Robin Knight replied to Mohan Selvaraj 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 


AA Akshaya Arivoli Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon