@Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
    {
        if (response instanceof HttpServletResponse && statusProperty.getValue()) {
            final String value = valueProperty.getValue();
            if (value != null && !value.trim().isEmpty()) {
                ((HttpServletResponse) response).setHeader("Content-Security-Policy", value);
            }
        }
        chain.doFilter(request, response);
    }
Adds Content-Security-Policy headers to HTTP responses.

This filter uses the values from to-be-supplied {@link SystemProperty} instances to configure if HTTP response
headers are to be added, and if so, what value to add.

@author Guus der Kinderen, guus@goodbytes.nl
xmppserver/src/main/java/org/jivesoftware/admin/ContentSecurityPolicyFilter.java