Open afattahi54 opened 1 day ago
<s:script/>
should do it already, how do you use the plugin? The plugin has been already adjusted, see #318
I see tags generates scripts like below (without nonce):
<script type="text/javascript">
jQuery(document).ready(function () {
var options_anchor_991965924 = {};
options_anchor_991965924.jqueryaction = "anchor";
options_anchor_991965924.id = "anchor_991965924";
options_anchor_991965924.targets = "helpPlaceHolder";
options_anchor_991965924.href = "/guidance/contact-us.ib";
options_anchor_991965924.listentopics = "contact-us";
jQuery.struts2_jquery.bind(jQuery('#anchor_991965924'),options_anchor_991965924);
});
</script>
I am using version 5.0.6
We are trying to set the
Content-Security-Policy
toscript-src 'self'
in our web based application., but we face issues. As the jquery-plugin library dynamically generates inline scripts, it is not possible to add this header.As I find this can be handled by adding
nonce
to<script>
.https://content-security-policy.com/nonce/
Is it possible that we configure struts jQuery tags to generate nonce