How to add remote javascript with Sub Resource Integrity

48 views
Skip to first unread message

Amit Pandey

unread,
Jan 8, 2021, 1:51:33 AM1/8/21
to SquishIt

Hi all,
I am trying to add remote javascript in my web application (Asp.Net C#) with sub resource integrity (SRI) but not able to add it.

Original Syntax:
<script src="https://cdnjs.cloudflare.com/ajax/libs/validator/13.5.2/validator.min.js" integrity="sha512-vZEoK8xRncku4g5GANHh5zobUjeCMbZkSEahrADeAcRlk/1Ignf8sAKojkV4RZLkPw145+ILJFisI2pnjsPtGQ==" crossorigin="anonymous"></script>

my code:

<%= Bundle.JavaScript()
.Add("~/js/jquery-3.1.0.js")
.Render("~/js/combined_#.js")
%>

Unable to find any syntax to add integrity in AddRemote() syntax. please help me on this.

Thanks.


Reply all
Reply to author
Forward
0 new messages