SDK Subresource integrity

A Subresource Integrity (SRI) check is a security feature that enables browsers to verify that the resources they fetch are delivered without unexpected manipulation. It works by allowing you to provide a cryptographic hash that a fetched resource must match.

Note: To use SRI, you must use a browser that supports this feature. If your browser does not support the feature, the browser simply loads the resource without any check. To see if your browser supports SRI, see here.


<script src="https://{version}/cm-js-client.js" integrity="{hash-type}-{hash}" crossorigin="anonymous"></script>

Instructions: Copy the above code to your page and replace {version} and {hash-type}-{hash} with the desired values (See table below).


If the integrity check fails, the resource is not loaded and an error message is created in the browser console. Here is an example of an error message:


Version Subresource integrity hash
1.0.0 sha384-Wjpa6SPg+YUBRSSl0AlRHlSZvXpvfE040bCEIqt2TKz4uwjGkhadRNkyis5nvmHu