Fix Integrity and CORS issue on Chrome (#89)
Adding `crossorigin="anonymous"` to avoid CORS issues.
This commit is contained in:
parent
14cd856ac6
commit
a9f2ddcfa9
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@
|
||||||
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
|
{{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
|
{{ $style := resources.Get "scss/style.scss" | resources.ExecuteAsTemplate "css/style.css" . | toCSS | minify | fingerprint -}}
|
||||||
<link rel="stylesheet" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }}>
|
<link rel="stylesheet" href="{{ $style.Permalink }}" {{ printf "integrity=%q" $style.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous">
|
||||||
{{- block "head" . -}}{{- end }}
|
{{- block "head" . -}}{{- end }}
|
||||||
{{- range .Site.Params.customCSS }}
|
{{- range .Site.Params.customCSS }}
|
||||||
<link rel="stylesheet" href="{{ . | absURL }}">
|
<link rel="stylesheet" href="{{ . | absURL }}">
|
||||||
|
@ -31,7 +31,7 @@
|
||||||
{{ block "main" . -}}{{ end -}}
|
{{ block "main" . -}}{{ end -}}
|
||||||
{{ block "footer" . -}}{{ end }}
|
{{ block "footer" . -}}{{ end }}
|
||||||
{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
|
{{ $script := resources.Get "js/main.js" | minify | fingerprint -}}
|
||||||
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }}></script>
|
<script src="{{ $script.Permalink }}" {{ printf "integrity=%q" $script.Data.Integrity | safeHTMLAttr }} crossorigin="anonymous"></script>
|
||||||
{{- partial "analytics.html" . }}
|
{{- partial "analytics.html" . }}
|
||||||
{{- if templates.Exists "partials/extra-foot.html" -}}
|
{{- if templates.Exists "partials/extra-foot.html" -}}
|
||||||
{{ partial "extra-foot.html" . }}
|
{{ partial "extra-foot.html" . }}
|
||||||
|
|
Loading…
Reference in a new issue