aboutsummaryrefslogtreecommitdiff
path: root/backend/templates
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-05 14:31:20 +0200
committerWilliam Hergès <william@herges.fr>2025-10-05 14:57:45 +0200
commitaf6678decc6166f388d6e62edcb1407d2ce08f83 (patch)
tree11a14b74c34b948fce8f84be307e1f589c445cf7 /backend/templates
parentb816fd4acf78de278dc254ffe264cacc83f67352 (diff)
feat(security): integrity on link and script
Diffstat (limited to 'backend/templates')
-rw-r--r--backend/templates/base.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/backend/templates/base.html b/backend/templates/base.html
index e56341b..cf0d834 100644
--- a/backend/templates/base.html
+++ b/backend/templates/base.html
@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ .Title }}</title>
- <link rel="stylesheet" href="{{ assets "styles.css" }}">
+ {{ $styles := asset "styles.css" }}<link rel="stylesheet" href="{{ $styles.Src }}" integrity="{{ $styles.Checksum }}">
<link rel="shortcut icon" href="{{ static .Logo.Favicon }}">
<meta property="description" content="{{ .Description }}" />
<!-- Open Graph -->
@@ -37,6 +37,6 @@
<p id="quote">«&thinsp;{{ .Quote }}&thinsp;»</p>
<p><a href="/legal">Mentions légales</a>, <a href="https://git.anhgelus.world/anhgelus/small-web">code source</a>.</p>
</footer>
-<script src="{{ assets "index.js" }}" defer></script>
+{{ $script := asset "index.js" }}<script src="{{ $script.Src }}" integrity="{{ $script.Checksum }}" defer></script>
</body>
</html>