layouts: add CORS policy to the script tag

This commit is contained in:
liushuyu 2022-05-13 16:28:20 -06:00
parent 95be508e27
commit 3fd2b76d92
No known key found for this signature in database
GPG key ID: 23D1CE4534419437

View file

@ -102,7 +102,7 @@
</div>
{{ $mainJs := resources.Match "js/**.js" | resources.Concat "js/script.js" | minify | fingerprint }}
<script src="{{ $mainJs.Permalink }}" integrity="{{ $mainJs.Data.Integrity }}"></script>
<script src="{{ $mainJs.Permalink }}" integrity="{{ $mainJs.Data.Integrity }}" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
{{- block "scripts" . }}{{- end }}
{{- if eq (getenv "HUGO_ENV") "PRD" }}