This is an automated email from the ASF dual-hosted git repository.

zhaocong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-doc.git


The following commit(s) were added to refs/heads/master by this push:
     new e1b3d261 fix: critical CSP problem (#391)
e1b3d261 is described below

commit e1b3d261880f08fadffc16c8714f29b8473971d3
Author: imbajin <[email protected]>
AuthorDate: Fri Feb 14 15:46:47 2025 +0800

    fix: critical CSP problem (#391)
---
 themes/docsy/layouts/_default/baseof.html | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/themes/docsy/layouts/_default/baseof.html 
b/themes/docsy/layouts/_default/baseof.html
index d0d87c9a..c7771b0f 100644
--- a/themes/docsy/layouts/_default/baseof.html
+++ b/themes/docsy/layouts/_default/baseof.html
@@ -1,6 +1,13 @@
 <!doctype html>
 <html lang="{{ .Site.Language.Lang }}" class="no-js">
   <head>
+      <!-- To handle CSP policy -->
+      <meta http-equiv="Content-Security-Policy"
+            content="default-src 'self';
+                    style-src 'self' 'unsafe-inline' https://code.jquery.com 
https://cdn.jsdelivr.net;
+                    script-src 'self' https://code.jquery.com 
https://cdn.jsdelivr.net;
+                    font-src 'self' https://cdn.jsdelivr.net;
+                    img-src 'self' data:">
     {{ partial "head.html" . }}
   </head>
   <body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end 
}}">
@@ -15,4 +22,4 @@
     </div>
     {{ partialCached "scripts.html" . }}
   </body>
-</html>
\ No newline at end of file
+</html>

Reply via email to