Skip to content

Add Subresource Integrity support - #1176

Merged
gaearon merged 2 commits into
react:masterfrom
XVincentX:master
Dec 6, 2016
Merged

Add Subresource Integrity support#1176
gaearon merged 2 commits into
react:masterfrom
XVincentX:master

Conversation

@XVincentX

@XVincentXXVincentX commented Dec 6, 2016

Copy link
Copy Markdown

This pull request will add to create-react-app the ability to inject into the final html page the integrity hashes required to take advantage of Subresource Integrity (when the browser supports it)

@gaearon

Copy link
Copy Markdown
Contributor

Have you verified it works?

@XVincentX

Copy link
Copy Markdown
Author

Yes it does on my machine - I'm trying to figure out if I can write a test for that.
Unfortunately it's the first time I dig into this repository so - it might require a bit.

@XVincentX

Copy link
Copy Markdown
Author

This is the result I'm getting on a production build.

image

@gaearon

Copy link
Copy Markdown
Contributor

No worries about the test—we don't have anything other than smoke checks at the moment.
Looks good.

@gaearongaearon added this to the 0.8.2 milestone Dec 6, 2016
@gaearon

Copy link
Copy Markdown
Contributor

LGTM

@gaearon
gaearon merged commit 11cd813 into react:masterDec 6, 2016
@gaearon

Copy link
Copy Markdown
Contributor

Thank you!

@XVincentX

Copy link
Copy Markdown
Author

That was fast! Thanks a lot, I'm glad I contributed.

mofelee added a commit to xiaohu-developer/create-react-app that referenced this pull request Dec 7, 2016
* master: (30 commits)
Relax peerDependencies for ESLint preset (react#1191)
Update Webpack to fix source map issues (react#1188)
Update webpack prod config (react#1181)
Chrome 'open tab' reuse an empty tab when possible (react#1165)
Use file-loader for svgs (react#1180)
Fix Babel issues in tests by applying the right transforms (react#1179)
[babel-preset-react-app] Temporary fix missing babel plugins (react#1177)
Add Subresource Integrity support (react#1176)
Remove path module from webpack config on eject. (react#1175)
Don't strip stack traces of evaluated webpack bundles (react#1050)
Add deploy to Firebase CDN on template's README (Closesreact#374) (react#1143)
Update e2e.sh (react#1167)
Document what npm build does and pushState (react#933)
Fix minor typo/grammar (react#1099)
Add "npm run build silently fails" to Troubleshooting (react#1168)
Add testURL to jest config (react#1120)
Make jsx-no-undef rule an error (react#1159)
Update CHANGELOG.md
Publish
Update changelog for 0.8.1
...
@gaearongaearon mentioned this pull request Dec 7, 2016
alexdriaguine pushed a commit to alexdriaguine/create-react-app that referenced this pull request Jan 23, 2017
* Add Subresource Integrity support
* Pin dependency
randycoulman pushed a commit to CodingZeal/create-react-app that referenced this pull request May 8, 2017
* Add Subresource Integrity support
* Pin dependency
@ghost

Copy link
Copy Markdown

Excuse me, how to use this? My final build doesn't contains SRI at all. What I'm doing wrong? In this page I can't find anything: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md

@XVincentX

Copy link
Copy Markdown
Author

@johnunclesam As far as I remember, the support has been unfortunately reverted.

@ghost

Copy link
Copy Markdown

@XVincentX but why Vincent? Can we add it again today?

@XVincentX

Copy link
Copy Markdown
Author

See #1231 for more details

@locklockBot locked and limited conversation to collaborators Jan 20, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@XVincentX@gaearon@facebook-github-bot