Current behavior:
When running Cypress against a site that implements SRI hashes, resources on the page are immediately blocked by Chrome and the page will not load due to invalid hashes. Disabling chromeWebSecurity does nothing. The following error appears in the Chrome DevTools console.
Failed to find a valid digest in the 'integrity' attribute for resource 'https://{my-domain}/assets/vendor-cdn-c9965fdc08cb8e112642197db5d0fc54.js' with computed SHA-256 integrity '2/Ht5YqBxaylA4fn2318LzUh4tFwjZH4WlN0lsHme9M='. The resource has been blocked.
Desired behavior:
The page of an SRI enabled site can load and not be blocked by Chrome. Either Cypress dynamically corrects the hash when it tampers with the file, or the chromeWebSecurity option actually disables SRI checks in Chrome.
Steps to reproduce:
- Start a Cypress instance and configure to point to a site that implements SRI checking (e.g. https://github.com).
- Implement a basic step that verifies anything on the page.
- Observe the test fail, the error message in the Chrome DevTools console and resources being unable to load.
Versions
Cypress 3.1.0
Fedora 28
Chrome 68.0.3440.106
Current behavior:
When running Cypress against a site that implements SRI hashes, resources on the page are immediately blocked by Chrome and the page will not load due to invalid hashes. Disabling
chromeWebSecuritydoes nothing. The following error appears in the Chrome DevTools console.Desired behavior:
The page of an SRI enabled site can load and not be blocked by Chrome. Either Cypress dynamically corrects the hash when it tampers with the file, or the
chromeWebSecurityoption actually disables SRI checks in Chrome.Steps to reproduce:
Versions
Cypress 3.1.0
Fedora 28
Chrome 68.0.3440.106