Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transitive module preloads & subresource integrity #317

Merged
merged 4 commits into from
Dec 5, 2023
Merged

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Dec 5, 2023

This…

  • Fetches any externally-hosted imported module to preload its transitive (static) imports
  • Computes the subresource integrity hash for module preloads

This improves performance by preloading transitive dependencies, not just direct dependencies. And it improves security by ensuring that the loaded modules match the subresource integrity hash. Only modules that are served with cache-control: immutable are eligible for transitive module preloads and subresource integrity.

Fixes #306.

@mbostock mbostock marked this pull request as ready for review December 5, 2023 05:47
@mbostock mbostock requested review from Fil, trebor and cinxmo December 5, 2023 05:48
@mbostock mbostock changed the title transitive preloads & subresource integrity transitive module preloads & subresource integrity Dec 5, 2023
@mbostock mbostock merged commit f56e578 into main Dec 5, 2023
1 check passed
@mbostock mbostock deleted the mbostock/sri branch December 5, 2023 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add subresource integrity hashes
2 participants