Skip to content

Commit

Permalink
fix: critical CSP problem (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
imbajin authored Feb 14, 2025
1 parent 491f503 commit e1b3d26
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion themes/docsy/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -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 }}">
Expand All @@ -15,4 +22,4 @@
</div>
{{ partialCached "scripts.html" . }}
</body>
</html>
</html>

0 comments on commit e1b3d26

Please sign in to comment.