Thursday, February 9, 2017

Fixing Mixed Content Insecure Errors when Loading Telerik JS scripts via a CDN

Telerik gives you the option to load its scripts via a CDN. However, if your site is running on HTTPS, you will get a mixed content error and the scripts will be blocked.

As of the 2010 version of Telerik, it's possible to load the Telerik scripts securely over HTTPS. To do this, add CdnSettings elements inside your RadScriptManager, making sure to include one each for BaseUrl and BaseSecureUrl.
<telerik:RadScriptManager runat="server" ID="ScriptManager1"> 
   <CdnSettings BaseSecureUrl="https://d2i2wahzwrm1n5.cloudfront.net" TelerikCdn="Enabled" /> 
   <CdnSettings BaseUrl="https://d2i2wahzwrm1n5.cloudfront.net" BaseSecureUrl="https://d2i2wahzwrm1n5.cloudfront.net" TelerikCdn="Enabled" /> 
</telerik:RadScriptManager>

Further Reading:
The Telerik CDN – Now with SSL support too!

No comments:

Post a Comment