monkeyWzr / hugo-theme-cactus

Cactus theme for hugo
MIT License
537 stars 338 forks source link

Missing `crossorigin` attribute for CSS link with integrity attribute #97

Closed leonseng closed 3 years ago

leonseng commented 3 years ago

I hosted my site on Netlify, and got a page with no CSS styling. Looking at the console shows I am getting the following error when loading the CSS:

Subresource Integrity: The resource 'https://example.com/css/styles.3293cde0ba45207bc30ea388dcd0b13853ce2a765f7062b3b64049d144d97ff3ebebfe523de731ae740d355ea236be1fb55794d29a7f84012e98e293c9da881c.css' has an integrity attribute, but the resource requires the request to be CORS enabled to check the integrity, and it is not. The resource has been blocked because the integrity cannot be enforced.

I had to add a crossorigin="anonymous" attribute to the stylesheet link here to resolve the error and get the CSS loaded.

Happy to do a PR if that's ok by you.

leonseng commented 3 years ago

Nevermind just saw this https://github.com/monkeyWzr/hugo-theme-cactus/pull/86