question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using subresource integrity

See original GitHub issue

Just wondering whether subresource integrity could be helpful when loading ethers-5.0.umd.min.js from the CDN rather than copying the file or loading it without subresource integrity.

I feel there are some benefits this would have, although I guess it is less decentralised than each site depending on ethers having its own copy.

I raise this as an issue because it would mean that the CDN copy would need to remain unchanged (unless it already always remains unchanged) and so it might be worth having finer granularity of versions served by the CDN. Additionally, the CDN would need to serve the file with Access-Control-Allow-Origin: * as mentioned under “Cross-Origin Resource Sharing and Subresource Integrity” here. It currently does not do this.

Also just want to say: this is an awesome project, thanks contributors and @ricmoo especially for your efforts!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Coda-Codacommented, Nov 25, 2020

@ricmoo thanks!! That is awesome 🎉 It all seems to work correctly as far as I can tell.

1reaction
ricmoocommented, Nov 24, 2020

This should now work, using the links to the cdn-cors.ethers.io links including in the release notes for each version. I’ve also back-filled all previous versions.

Try it out and let me know if there is any problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding Subresource Integrity - Smashing Magazine
Subresource Integrity is a browser feature you can use to make sure that the code being used is exactly what you intended.
Read more >
Subresource Integrity - W3C
A user agent wishes to ensure that JavaScript code running in high-privilege HTML contexts (for example, a browser's New Tab page) aren't ...
Read more >
Securing Your Website With Subresource Integrity - CSS-Tricks
Solution: Subresource Integrity (SRI) ... SRI is a security policy that prevents the loading of resources that don't match an expected hash. By ......
Read more >
What Is Subresource Integrity (SRI) - KeyCDN Support
Subresource integrity, or SRI, is a security feature that allows your browser to distinguish if the files being retrieved have been ...
Read more >
Subresource Integrity - Wikipedia
Subresource Integrity or SRI is a W3C recommendation to provide a method to protect website delivery. Specifically, it validates assets served by a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found