incubator-pagespeed-ngx
incubator-pagespeed-ngx copied to clipboard
Not respecting integrity attribute
trafficstars
I have stylesheets included with an integrity attribute, such as:
<link rel="stylesheet" integrity="sha256-5fdBwaEAkIK97n+WbeomkIiEcrL4lG3AcFWR7uatT98=" crossorigin="anonymous" href="https://sambull.org/wp-content/themes/penscratch/style.css" type="text/css" />
When Pagespeed optimises these stylesheets, it fails to rewrite the integrity attribute, meaning that the security check then fails and the browser doesn't load the CSS at all.
Pagespeed needs to rewrite the integrity attribute, and ideally any matching hashes in the CSP header should also be rewritten.