google-mapsgoogle-maps-api-3google-cdnsubresource-integrity

Sub Resource Integrity value for //maps.google.com/maps/api/js


Where do i find the sub resource integrity value for the script //maps.google.com/maps/api/js?

For example:

<script src="//maps.google.com/maps/api/js" integrity="sha256-????" crossorigin="anonymous"></script>

Solution

  • to generate integrity Hash code, you can use this website :

    https://www.srihash.org/

    you paste your URL and then generate the hash online. However, I don't think it's possible to do it with google Maps API. I get the following message :

    Error: this resource is not eligible for integrity checks. See http://enable-cors.org/server.html