Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

SRI check on WP, HSTS site #259

Open
churchthecat opened this issue Sep 16, 2021 · 3 comments
Open

SRI check on WP, HSTS site #259

churchthecat opened this issue Sep 16, 2021 · 3 comments

Comments

@churchthecat
Copy link

churchthecat commented Sep 16, 2021

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?

@floatingatoll
Copy link

floatingatoll commented Sep 16, 2021 via email

@churchthecat
Copy link
Author

churchthecat commented Sep 16, 2021 via email

@churchthecat
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants