I am trying to implement SubResource Integrity to the webpage. I have an inline javascript which gets constructed dynamically based on certain variables,
https://example.com/<DYNAMIC_VALUE>.js
Separate contents of the file is rendered for each dynamic value specified as part of the URL. As integrity hash is computed based on the content, it is really not possible to precompute the hash for the script tag (as the DYNAMIC_VALUE can either be 1001, 1002,...n).
<-- script src="https://example.com/<DYNAMIC_VALUE>.js" integrity="???" crossorigin="anonymous">
</script -->
Is there any best practice for SRI with this kind of scenario involving dynamic variables? Thanks!