michaelmolloy Posted October 18, 2021 Share Posted October 18, 2021 I need to add subresource integrity (SI) to my squarespace site, but I have no idea how to do that or if it is even possible. If you aren't familiar with subresource integrity, it is simply including a hash of a javascript file inside the javascript tag that loads that library. The browser uses the hash to ensure that the library being downloaded hasn't changed since the hash was generated. So for example, here is the tag that loads one of the SquareSpace libraries that my site uses: <script type="text/javascript" crossorigin="anonymous" src="//assets.squarespace.com/@sqs/polyfiller/1.2.2/modern.js"></script> I need to get an "integrity" attribute in there somehow. Suggestions? Beyondspace 1 Link to comment
Beyondspace Posted November 9, 2021 Share Posted November 9, 2021 On 10/18/2021 at 7:48 AM, michaelmolloy said: I need to add subresource integrity (SI) to my squarespace site, but I have no idea how to do that or if it is even possible. If you aren't familiar with subresource integrity, it is simply including a hash of a javascript file inside the javascript tag that loads that library. The browser uses the hash to ensure that the library being downloaded hasn't changed since the hash was generated. So for example, here is the tag that loads one of the SquareSpace libraries that my site uses: <script type="text/javascript" crossorigin="anonymous" src="//assets.squarespace.com/@sqs/polyfiller/1.2.2/modern.js"></script> I need to get an "integrity" attribute in there somehow. Suggestions? We can't edit how the squarespace assets is loaded, only the one we place on code injection BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment