mozilla/http-observatory-website

SRI check on WP, HSTS site

churchthecat opened this issue · 3 comments

I get the following error:
Subresource Integrity (SRI) not implemented, and external scripts are loaded over HTTP or use protocol-relative URLs via src="//..."
for site: operalogg.com
and -50 points.
Not sure how to fix since SRI is hard to do on WP. Everything is loaded over HTTPS. remains that the following are relative URLs

Now I changed the script tag in the theme to (adding https:):

<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-xxxxxxxxxx", enable_page_level_ads: true }); </script>

cleaned cache but no changes in head when checking in console.

The CDN is integrated in WP-rocket and no option to force absolute URL.
Tried better search and replace plugin, but that did not work.
Any Idea? I need to pass this score, everything is loaded securely so I don't understand why relative URLs should be such an issue?

Thanks for the clarification in edit. It seems I got the error on another page as well. I assume that the possibility for an downgrade attack, with current settings in place are non-existent. Well at least until someone hacks google maybe :). So I will just leave this for now.
But I have to say, it does seem a bit excessive to dock 50 points on the test in this case.