Add referrerpolicy param

This commit is contained in:
Will Faught
2023-01-06 21:49:32 -08:00
parent 57af01ec55
commit 70fe45c70c

View File

@@ -3,6 +3,7 @@
{{ $href := .href }}
{{ $integrity := .integrity }}
{{ $onload := .onload | safeJS }}
{{ $referrerpolicy := .referrerpolicy | default "no-referrer" }}
{{ $src := .src }}
<script {{ if ne $href (urls.Parse $href).Path }} {{ with $crossorigin }} crossorigin="{{ $anonymous }}" {{ end }} {{ with $defer }} defer {{ end }} {{ with $integrity }} integrity="{{ . }}" {{ end }} {{ with $onload }} onload="{{ . }}" {{ end }} referrerpolicy="no-referrer" src="{{ partial `paige/func-url.html` $src }}"></script>
<script {{ if ne $href (urls.Parse $href).Path }} {{ with $crossorigin }} crossorigin="{{ $anonymous }}" {{ end }} {{ with $defer }} defer {{ end }} {{ with $integrity }} integrity="{{ . }}" {{ end }} {{ with $onload }} onload="{{ . }}" {{ end }} {{ with $referrerpolicy }} referrerpolicy="{{ . }}" {{ end }} src="{{ partial `paige/func-url.html` $src }}"></script>