Google Chrome SRI hash
Asked Answered
M

1

12

Has anyone came across this problem with Google Chrome and SRI Hash, it keeps throwing the same error in the console window:

Failed to find a valid digest in the 'integrity' attribute for resource 'https://fonts.googleapis.com/css?family=Indie+Flower' with computed SHA-256 integrity 'yxJPuU/cJi0/8FoS+agssT/MtC4P3SGuU+JOzbTejqQ='. The resource has been blocked.

I'm generating the code from https://report-uri.io/home/sri_hash and have also tried https://www.srihash.org/

According to this website https://glebbahmutov.com/blog/subresource-integrity/ the author had the same issue, so added multiple hashes which is what I have <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Indie+Flower" integrity="sha256-CoGIUDlbZltnYk6u/wQKXOszdOOWImA1XzSERnNzHlc= sha384-vk+perBz0d5g0G+x7+4BxElvHeiaLNX7jegOI63Bg53TxNYaUzLGEsSQ4AmIwVr4 sha512-h+9Z3+9s3jtPJjXU9phAXFQwYYFSYhXlnkPwkuubLFf5kfeXWIRC32YkRdB08xmut/dJG/RjPoiR/r4DAtm3PQ==" crossorigin="anonymous">

Margotmargrave answered 18/5, 2017 at 9:18 Comment(3)
I'm currently facing this issue. I have an ember application that was working fine, until I deployed it into an environment with ssl. The funny thing is that it works for stylesheets, but not to js resources.Semple
I am facing the same issue. I see that this question was asked a few months back, were you able to find the solution?Lutz
Sorry never found a solution, I think I remembered reading somewhere that it was an issue with Chrome. But cannot remember fully. SorryMargotmargrave
B
13

This has to deal with the fact that Google fonts serves different files depending on the browser. Because of that, it hashes out differently depending on which browser the user is using.

Here is some info from Google on if they would adjust their system or not to support it. https://github.com/google/fonts/issues/473

Beersheba answered 28/9, 2017 at 20:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.