In ASP.NET MVC 5, is it possible to use BundleColletion.UseCdn
and render it with an HTML integrity attribute? For example, is there a way to do this:
bundles.UseCdn = true; bundles.Add( new ScriptBundle("~/bundles/jquery", "https://code.jquery.com/jquery-3.1.1.min.js") .Include("~/Scripts/js/jquery/jquery-3.1.1.min.js") );
do like that?
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
source share