• Resolved tfolkman

    (@tfolkman)


    Hello,
    Thank you for this plugin. I am having trouble getting it work with my CDN. After some research online, I included the following header on my site:

    Access-Control-Allow-Origin "*"

    I also set my CDN (cloudfront) to forward the CORS header to the CDN. But on the Subresource Integrity Manager screen the message is “no hashes known.” Would appreciate help!

    Thank you!

    • This topic was modified 6 years, 7 months ago by tfolkman.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter tfolkman

    (@tfolkman)

    Update: I had disabled the use of Google Fonts with a plugin, but if I enable it, then wp-sri does produce a hash for the Google Fonts css file.

    Plugin Author Meitar

    (@meitar)

    Thread Starter tfolkman

    (@tfolkman)

    Thank you for the response and the references. I may have thrown you off the track with my mention of Google fonts. Whether I disable Google Fonts or not, the other js and css files (e.g., my theme’s style.css file) are not given hashes. I only mentioned my experience with Google fonts as a way of saying that the plugin itself seems to be working (because it generates a hash for Google fonts), but that for a reason I don’t understand it isn’t generating hashes for any of my other scripts or stylesheets.

    Thank you again! I hope I am describing the issue in a way that is useful, but if not, please let me know.

    Plugin Author Meitar

    (@meitar)

    https://wordpress.org/support/topic/doesnt-work-with-wp-4-7-1/#post-8664592

    https://wordpress.org/support/topic/no-sri-attributes-rendered/

    Please, please just try to find your answer in this forum’s archives. These linked references are not even buried posts.

    Thread Starter tfolkman

    (@tfolkman)

    I’m sorry, I understand you don’t need to answer questions, and I appreciate you doing so. But with respect, I read both of these references, as well as the Google Fonts reference, before posing my question, and none of them have to do with my case as far as I can tell. I use HTTPS, not HTTP. The resources in question are not served by the same server as the page that contains them. Perhaps some of my plugins or my theme don’t use the WP API, but I’m using a default theme (twenty-thirteen) and very widely used plugins (e.g., Contact Form 7), so it is surprising to me that none of the js or css files have hashes attached to them.

    You have marked this as resolved, so please do not feel that you need to reply further.

    Plugin Author Meitar

    (@meitar)

    But with respect, I read both of these references, as well as the Google Fonts reference, before posing my question, and none of them have to do with my case as far as I can tell.

    This was unclear. Thanks for clarifying.

    I’m using a default theme (twenty-thirteen) and very widely used plugins (e.g., Contact Form 7), so it is surprising to me that none of the js or css files have hashes attached to them.

    The Twenty Thirteen Theme is, of course, from 2013, which is considered very old. Regardless, its resources such as stylesheets and such should be served from your same site, meaning that the integrity attributes are not added, intentionally. Likewise, Contact Form 7 and many other well-written plugins bundle their resources with the plugin itself, which also means that those resources will not include integrity attributes, either.

    It may simply be the case that your page does not actually meet the criteria for SRI to be useful, in which case the plugin does not modify your output, by design.

    If you can point at a specific resource you’re confused about, and if you can verify that it is in fact added to WordPress via the WordPress Plugin API hooks, I’ll happily take a closer look. But I haven’t the available resources to hunt for such an example on your site.

    Good luck!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘CDN trouble’ is closed to new replies.