Skip to content

Commit 14fc1f7

Browse files
authored
fix: move csp rule (#393)
1 parent e4b928f commit 14fc1f7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

themes/docsy/layouts/_default/baseof.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<!doctype html>
22
<html lang="{{ .Site.Language.Lang }}" class="no-js">
33
<head>
4-
<!-- To handle CSP policy -->
5-
<meta http-equiv="Content-Security-Policy"
6-
content="script-src 'self' 'unsafe-inline' 'unsafe-eval' https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
7-
style-src 'self' 'unsafe-inline' https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
8-
font-src 'self' https://cdn.jsdelivr.net;
9-
img-src 'self' data:">
104
{{ partial "head.html" . }}
115
</head>
126
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">

themes/docsy/layouts/partials/head.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<meta charset="utf-8">
22
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
3+
<!-- To handle CSP policy -->
4+
<meta http-equiv="Content-Security-Policy"
5+
content="
6+
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://analytics.apache.org https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
7+
style-src 'self' 'unsafe-inline' https://code.jquery.com https://cdn.jsdelivr.net https://fonts.googleapis.com/;
8+
">
39
{{ hugo.Generator }}
410
{{ range .AlternativeOutputFormats -}}
511
<link rel="{{ .Rel }}" type="{{ .MediaType.Type }}" href="{{ .Permalink | safeURL }}">

0 commit comments

Comments
 (0)