Skip to content

Commit

Permalink
fix: move csp rule (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
imbajin authored Feb 14, 2025
1 parent e4b928f commit 14fc1f7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 0 additions & 6 deletions themes/docsy/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
<!doctype html>
<html lang="{{ .Site.Language.Lang }}" class="no-js">
<head>
<!-- To handle CSP policy -->
<meta http-equiv="Content-Security-Policy"
content="script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
style-src 'self' 'unsafe-inline' https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
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 Down
6 changes: 6 additions & 0 deletions themes/docsy/layouts/partials/head.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- To handle CSP policy -->
<meta http-equiv="Content-Security-Policy"
content="
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://analytics.apache.org https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
style-src 'self' 'unsafe-inline' https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
">
{{ hugo.Generator }}
{{ range .AlternativeOutputFormats -}}
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">
Expand Down

0 comments on commit 14fc1f7

Please sign in to comment.