Class ContentSecurityPolicyFilter
java.lang.Object
com.sodius.oslc.server.services.HttpFilter
com.sodius.oslc.server.security.services.ContentSecurityPolicyFilter
- All Implemented Interfaces:
Filter
Sets in the HTTP response a
Content-Security-Policy header with child-src and frame-ancestors attributes
reflecting the OSLC friend applications.- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) Processes this filter and either executes or blocks the chain.Methods inherited from class com.sodius.oslc.server.services.HttpFilter
destroy, doFilter, handleOslcError, init
-
Constructor Details
-
ContentSecurityPolicyFilter
public ContentSecurityPolicyFilter()
-
-
Method Details
-
doFilter
protected void doFilter(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException Description copied from class:HttpFilterProcesses this filter and either executes or blocks the chain.Subclasses may throw a
OslcWebApplicationExceptionto report anOslcError. This filter will automatically serialize such error in the HTTP response.- Specified by:
doFilterin classHttpFilter- Parameters:
request- the request.response- the response.chain- the filter chain to process.- Throws:
IOException- if an I/O error occurs.ServletException- if the filter execution fails.
-