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

Adding troubleshooting information about Subresource Integrity digests. #1220

Merged
merged 1 commit into from
Dec 9, 2016
Merged

Conversation

dfbaskin
Copy link
Contributor

@dfbaskin dfbaskin commented Dec 9, 2016

Adding this section to the troubleshooting documentation:

Subresource integrity checks fail

Subresource Integrity digests are added to the build output files. For a particular scenario, these checks may fail when deployed. The files are built using LF characters, but if your deployment uses a Git repository for deployment (like Azure web sites) and the Git repository is set up to translate LF characters into CR/LF characters, then the checked out files will be different and the digests will be invalid.

To fix this, just add a .gitattributes file to your deployment repository that will ensure the build files are not modified when checked out:

*.css text eol=lf
*.js text eol=lf

@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at [email protected]. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact [email protected] if you have any questions.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon
Copy link
Contributor

gaearon commented Dec 9, 2016

Can we generate this file by default? Like we generate .gitignore.

@dfbaskin
Copy link
Contributor Author

dfbaskin commented Dec 9, 2016

The .gitattributes file is for the deployment repository. Most folks using Git to deploy like this would create a separate repository for the output build files.

@gaearon gaearon merged commit f44ae25 into facebook:master Dec 9, 2016
@gaearon
Copy link
Contributor

gaearon commented Dec 9, 2016

Sounds good, thanks!

@gaearon gaearon mentioned this pull request Dec 11, 2016
alexdriaguine pushed a commit to alexdriaguine/create-react-app that referenced this pull request Jan 23, 2017
randycoulman pushed a commit to CodingZeal/create-react-app that referenced this pull request May 8, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to 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.

None yet

4 participants