diff options
author | Zorawar Moolenaar <zorawar87@gmail.com> | 2019-08-18 15:38:40 +0300 |
---|---|---|
committer | Track3 <34504964+Track3@users.noreply.github.com> | 2019-08-18 15:38:40 +0300 |
commit | a9f2ddcfa9f9c5ba93902995162c268f860c1750 (patch) | |
tree | 00fba19b7fc93d9c4e74c966a6e0086e5421b0b8 | |
parent | 14cd856ac650c5f669cc7f83ebb7f7293f76bf7d (diff) |
Fix Integrity and CORS issue on Chrome (#89)
Adding `crossorigin="anonymous"` to avoid CORS issues.
-rw-r--r-- | layouts/_default/baseof.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index b495afe..cdb9a1f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -16,7 +16,7 @@ {{ printf `<link rel="%s" type="%s+%s" href="%s" title="%s" />` .Rel .MediaType.Type .MediaType.Suffix .Permalink $.Site.Title | safeHTML }} {{ end -}} {{ $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 }} {{- range .Site.Params.customCSS }} <link rel="stylesheet" href="{{ . | absURL }}"> @@ -31,7 +31,7 @@ {{ block "main" . -}}{{ end -}} {{ block "footer" . -}}{{ end }} {{ $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" . }} {{- if templates.Exists "partials/extra-foot.html" -}} {{ partial "extra-foot.html" . }} |