Package org.jivesoftware.admin
Class ContentSecurityPolicyFilter
java.lang.Object
org.jivesoftware.admin.ContentSecurityPolicyFilter
- All Implemented Interfaces:
javax.servlet.Filter
- Direct Known Subclasses:
AdminContentSecurityPolicyFilter,HttpBindContentSecurityPolicyFilter
Adds Content-Security-Policy headers to HTTP responses.
This filter uses the values from to-be-supplied
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
-
Constructor Summary
ConstructorsConstructorDescriptionContentSecurityPolicyFilter(SystemProperty<Boolean> statusProperty, SystemProperty<String> valueProperty) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.Filter
destroy, init
-
Constructor Details
-
ContentSecurityPolicyFilter
public ContentSecurityPolicyFilter(@Nonnull SystemProperty<Boolean> statusProperty, @Nonnull SystemProperty<String> valueProperty)
-
-
Method Details
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Specified by:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-