Add crossorigin="anonymous" also for scripts
This commit is contained in:
parent
bb7b6f0076
commit
b756217126
@ -65,10 +65,10 @@
|
|||||||
{{- $fusejs := resources.Get "js/fuse.js" }}
|
{{- $fusejs := resources.Get "js/fuse.js" }}
|
||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||||
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify | fingerprint }}
|
||||||
<script defer src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script>
|
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" onload="loadSearch();" integrity="{{ $search.Data.Integrity }}"></script>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }}
|
{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" | minify }}
|
||||||
<script defer src="{{ $search.RelPermalink }}" onload="loadSearch();"></script>
|
<script defer crossorigin="anonymous" src="{{ $search.RelPermalink }}" onload="loadSearch();"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
@ -78,11 +78,11 @@
|
|||||||
{{- if not .Site.Params.assets.disableFingerprinting }}
|
{{- if not .Site.Params.assets.disableFingerprinting }}
|
||||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify |
|
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify |
|
||||||
fingerprint }}
|
fingerprint }}
|
||||||
<script defer src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" integrity="{{ $highlight.Data.Integrity }}"
|
||||||
onload="hljs.initHighlightingOnLoad();"></script>
|
onload="hljs.initHighlightingOnLoad();"></script>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }}
|
{{- $highlight := slice (resources.Get "js/highlight.min.js") | resources.Concat "assets/js/highlight.js" | minify }}
|
||||||
<script defer src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
<script defer crossorigin="anonymous" src="{{ $highlight.RelPermalink }}" onload="hljs.initHighlightingOnLoad();"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user