Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

How to set base-uri for the Struts 2 CSP Interceptor?

$
0
0

Version 6 of Struts introduced the Content Security Policy interceptor which is in the default stack. It has a nonce-based attribute which allows putting scripts and links via the Struts <s:script> and <s:link> tag, which is quite nice.

However, I do want to be able to set the base-uri value to the standard one for my site. I do not see an easy way to do this. There is a CSPSettings class which allows setting things on a per-action basis -- I'd prefer global -- but even there, it doesn't seem to do what I want. You can change from report-only to enforced, and change where reports are sent -- and that seems to be it.

Anyone know how to do this?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>