Add integrity attribute to script used by CNCF Landscape shortcode (#45412)

* Add integrity attribute to script

* Add integrity attribute to script

* Add integrity attribute to script
This commit is contained in:
John.C 2024-03-08 17:02:27 +00:00 committed by GitHub
parent 247d6377b9
commit dfc0c6682e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -91,6 +91,10 @@
<script defer src="{{ "js/release_binaries.js" | relURL }}"></script>
{{- end -}}
{{- if .HasShortcode "cncf-landscape" -}}
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.9/iframeResizer.min.js" integrity="sha384-hHTwgxzjpO1G1NI0wMHWQYUxnGtpWyDjVSZrFnDrlWa5OL+DFY57qnDWw/5WSJOl" crossorigin="anonymous"></script>
{{- end -}}
{{- if eq (lower .Params.cid) "community" -}}
{{- if eq .Params.community_styles_migrated true -}}
<link href="/css/community.css" rel="stylesheet"><!-- legacy styles -->

View File

@ -57,7 +57,6 @@ document.addEventListener("DOMContentLoaded", function () {
</script>
{{- end -}}
<div id="frameHolder">
<script src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/4.3.9/iframeResizer.min.js"></script>
{{ if ( .Get "category" ) }}
<iframe id="iframe-landscape" src="https://landscape.cncf.io/embed/embed.html?key={{ .Get "category" }}&headers=false&style=shadowed&size=md&bg-color=%233371e3&fg-color=%23ffffff&iframe-resizer=true" style="width: 1px; min-width: 100%; min-height: 100px; border: 0;"></iframe>
<script>