diff --git a/layouts/partials/head/csp.html b/layouts/partials/head/csp.html
index 2fc5f806797bd682670729dff678cd832c81c2a3..82d5cb2279874ffd35e4c4c0a7f0649caa1de7d8 100644
--- a/layouts/partials/head/csp.html
+++ b/layouts/partials/head/csp.html
@@ -1,3 +1,5 @@
+{{- with site.Data.website.external_domains -}}
 <meta
   http-equiv="Content-Security-Policy"
-  content="default-src 'self' https://* {{ if not hugo.IsProduction }}'unsafe-inline'{{ end }}" />
\ No newline at end of file
+  content="default-src 'self' {{ delimit . " " }} {{ if not hugo.IsProduction }}'unsafe-inline'{{ end }}" />
+{{- end -}}
\ No newline at end of file