Auto SRI

Auto SRI

توسط

Auto SRI automatically adds Subresource Integrity (SRI) attributes to scripts and styles loaded from external sources.

This improves security, protects against tampering, and enables strict Content Security Policy (CSP) setups.

Features

  • ✔ Adds SRI to all external <script> and <link> tags
  • ✔ Supports WordPress-enqueued assets and raw HTML tags
  • ✔ Supports async, defer, crossorigin, and multiline script tags
  • ✔ Caches all hashes for performance
  • ✔ Excludes admin panel (wp-admin) to prevent conflicts
  • ✔ Automatically skips non-SRI-compatible providers:
    • Google reCAPTCHA
    • Google Fonts (fonts.googleapis.com / fonts.gstatic.com)
    • WordPress.com widgets (widgets.wp.com)
    • Dynamic concatenated resources
    • Dynamic script loaders and runtime-inserted scripts
  • ✔ Safe for Elementor, WooCommerce, CookieYes, Jetpack, GoDaddy hosting, etc.

Why some scripts are excluded

This plugin automatically excludes:

  • Google reCAPTCHA (google.com/recaptcha)
  • Google Fonts stylesheets (fonts.googleapis.com)
  • Google Fonts font files (fonts.gstatic.com)
  • WordPress.com widgets (widgets.wp.com)
  • Dynamic concatenated resources (/_static/??)
  • Other dynamic inline loaders (CookieYes, wsimg, ywxi, etc.)

Want to whitelist a dynamic provider? Contact us at izafirsk@gmail.com.
* Other dynamic inline loaders (CookieYes, wsimg, ywxi, etc.)

Want to whitelist a dynamic provider? Contact us at izafirsk@gmail.com.

These exclusions prevent:

  • CORS failures
  • Integrity mismatch blocking
  • Google reCAPTCHA from breaking
  • Google Fonts from disappearing
  • Layout shifts caused by blocked assets
  1. Upload the plugin to /wp-content/plugins/auto-sri

سوالات متداول

Does this plugin apply SRI in the WordPress admin panel?

No. The plugin automatically skips the WordPress admin panel (wp-admin) to prevent any conflicts with admin scripts and ensure smooth backend operation.

Why are some scripts not receiving SRI?

Scripts from Google reCAPTCHA, Google Fonts, wsimg, ywxi, and other dynamic sources cannot support SRI because their content changes on every request.

This plugin intelligently detects those sources and safely skips them.

Does this affect performance?

No. SRI hashes are computed once and stored in the WordPress options table.

Does this break Elementor or CookieYes?

No. This plugin is fully compatible and tested against common dynamic script loaders.

Does this plugin help with CSP?

Yes — it allows you to safely enforce:

For excluded domains, you should whitelist them in your CSP.

تصویری برای این آیتم موجود نیست.
نظری برای این آیتم موجود نیست.
0 0 رای ها
امتیازدهی
اشتراک در
اطلاع از
0 نظرات
قدیمی‌ترین
تازه‌ترین بیشترین رأی
بازخورد (Feedback) های اینلاین
مشاهده همه دیدگاه ها
نسخه حجم فایل SHA256 تغییرات دانلود
2.3 13 کیلوبایت -
دانلود
×
بدون امتیاز

قیمت:

رایگان

نگارش

2.3

آخرین انتشار

21 اردیبهشت 1405

آخرین بروزرسانی

1 ماه پیش

نصب های فعال

300+

نگارش وردپرس

وردپرس 5.0+

تست شده از نسخه

وردپرس 6.8.5

نگارش PHP

-

نسخه ها

1 نسخه