mouse_s mouse_s - 1 year ago 109
CSS Question

Content Security Policy blocking CDN

I am new at coding and I working on making a website using bootstrap framework now I use the bootstrap cdn's for javascript and css but once I put the website on a server it blocks the external links. I tried to insert the cdn's into a meta tag as follows:

<meta http-equiv="Content-Security-Policy" content="default-src 'self'"/>

but once put on the server the browser still blocks the scripts.
Can you please tell me what I'm doing wrong. I would like to deal with Content Security Policy inside a hypertext file if possible.

Answer Source

From your comment:

I think I figured out the problem The CDN files use HTTP protocol while the server is a HTTPS server. The console says: Mixed content: The page was loaded over HTTPS, but requested an insecure stylesheet This request has been blocked; the content must be served over HTTPS.

Then request and whitelist from https:

<meta http-equiv="Content-Security-Policy" content="default-src 'self'"/>  
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download