Skip to content

Commit

Permalink
Add subresource integrity to tracking script
Browse files Browse the repository at this point in the history
  • Loading branch information
flokoe committed Jun 5, 2024
1 parent 824d92f commit b0c65f4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion themes/v1/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
<!-- {{ partialCached "head/js.html" . }} -->

{{ if hugo.IsProduction }}
<script async src="https://offen.citizenalpha.de/script.js"
{{ $src := "https://offen.citizenalpha.de/script.js" }}
<script
async
src="{{ $src }}"
integrity="sha256-{{ resources.GetRemote $src | crypto.SHA256 }}"
crossorigin="anonymous"

data-account-id="d5573aed-d858-4371-b256-b4c1e9a9b450"
data-locale="de"
></script>
Expand Down

0 comments on commit b0c65f4

Please sign in to comment.