diff options
author | Robert J <chew-z@users.noreply.github.com> | 2019-01-25 17:31:09 +0300 |
---|---|---|
committer | Hanzei <16541325+hanzei@users.noreply.github.com> | 2019-01-25 17:31:09 +0300 |
commit | 9b495484672135b25a58cfa7b7fd9d3107f47f62 (patch) | |
tree | db8c49b8ba9f3844bfdba7767e2ce3e6d48ec71c /layouts | |
parent | 5bba25cd1667edaa8da42919ab5bdc6e5870ed42 (diff) |
CORS and Polish lang (#126)
I propose adding `crossorigin=anonymous` for signed stylesheets to allow for CORS policy.
Practical example - I keep my web page in S3 bucket and redirect both naked domain and www domain into the same bucket (this is rare scenario - most people duplicate buckets).
So I had to enable CORS like in [this article](https://medium.com/@Keithweaver_/only-allowing-access-to-your-s3-bucket-via-your-website-5ca5c8546152) However CORS cannot be used without crossorigin=anonymous set. (explained [here](https://stackoverflow.com/questions/32039568/what-are-the-integrity-and-crossorigin-attributes)
Also added pl.toml for Polish language.
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/css/owlCarousel.html | 2 | ||||
-rw-r--r-- | layouts/partials/head/css.html | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/layouts/partials/css/owlCarousel.html b/layouts/partials/css/owlCarousel.html index d42e685..2111705 100644 --- a/layouts/partials/css/owlCarousel.html +++ b/layouts/partials/css/owlCarousel.html @@ -1,4 +1,4 @@ {{ $owlCarousel := resources.Get "vendor/owlCarousel/owl.carousel.min.css" }} {{ $owlCarouselTheme := resources.Get "vendor/owlCarousel/owl.theme.default.min.css" }} {{ $owlCarouselBundle := slice $owlCarousel $owlCarouselTheme | resources.Concat "/styles/owlCarousel.min.css" | fingerprint }} -<link rel="stylesheet" href="{{ $owlCarouselBundle.Permalink }}" integrity="{{ $owlCarouselBundle.Data.Integrity }}" media="screen"> +<link rel="stylesheet" href="{{ $owlCarouselBundle.Permalink }}" integrity="{{ $owlCarouselBundle.Data.Integrity }}" crossorigin="anonymous" media="screen"> diff --git a/layouts/partials/head/css.html b/layouts/partials/head/css.html index 0b3f461..6671f4c 100644 --- a/layouts/partials/head/css.html +++ b/layouts/partials/head/css.html @@ -8,11 +8,11 @@ {{ $cssOpts := (dict "targetPath" "/css/main.css" ) }} {{ $postCSSOpts := (dict "use" "autoprefixer" ) }} {{ $bundle := $bundleRaw | toCSS $cssOpts | postCSS $postCSSOpts | minify | fingerprint }} -<link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" media="screen"> +<link rel="stylesheet" href="{{ $bundle.Permalink }}" integrity="{{ $bundle.Data.Integrity }}" crossorigin="anonymous" media="screen"> {{ end }} <!-- Custom css --> {{ range .Site.Params.customCSS -}} {{ $style := resources.Get . }} - <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" media="screen"> + <link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}" crossorigin="anonymous" media="screen"> {{- end }} |