Package org.jivesoftware.admin
Class ContentSecurityPolicyFilter
- java.lang.Object
-
- org.jivesoftware.admin.ContentSecurityPolicyFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
AdminContentSecurityPolicyFilter
,HttpBindContentSecurityPolicyFilter
public class ContentSecurityPolicyFilter extends Object implements javax.servlet.Filter
Adds Content-Security-Policy headers to HTTP responses. This filter uses the values from to-be-suppliedSystemProperty
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
-
-
Constructor Summary
Constructors Constructor Description ContentSecurityPolicyFilter(SystemProperty<Boolean> statusProperty, SystemProperty<String> valueProperty)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
-
-
-
Constructor Detail
-
ContentSecurityPolicyFilter
public ContentSecurityPolicyFilter(@Nonnull SystemProperty<Boolean> statusProperty, @Nonnull SystemProperty<String> valueProperty)
-
-
Method Detail
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
- Specified by:
doFilter
in interfacejavax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
-
-