Package com.helger.xservlet.filter
Class XServletFilterSecurityHttpReferrerPolicy
- java.lang.Object
-
- com.helger.xservlet.filter.XServletFilterSecurityHttpReferrerPolicy
-
- All Implemented Interfaces:
IXServletLowLevelFilter
public class XServletFilterSecurityHttpReferrerPolicy extends Object implements IXServletLowLevelFilter
Always set the correct "Referrer-Policy" header.- Since:
- 9.0.0
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description XServletFilterSecurityHttpReferrerPolicy(com.helger.http.EHttpReferrerPolicy eHttpReferrerPolicy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.helger.commons.state.EContinuebeforeRequest(javax.servlet.http.HttpServletRequest aHttpRequest, javax.servlet.http.HttpServletResponse aHttpResponse, com.helger.http.EHttpVersion eHttpVersion, com.helger.commons.http.EHttpMethod eHttpMethod)Invoked before an XServlet request is handled.com.helger.http.EHttpReferrerPolicygetHttpReferrerPolicy()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.helger.xservlet.filter.IXServletLowLevelFilter
afterRequest
-
-
-
-
Constructor Detail
-
XServletFilterSecurityHttpReferrerPolicy
public XServletFilterSecurityHttpReferrerPolicy(@Nonnull com.helger.http.EHttpReferrerPolicy eHttpReferrerPolicy)
-
-
Method Detail
-
getHttpReferrerPolicy
@Nonnull public final com.helger.http.EHttpReferrerPolicy getHttpReferrerPolicy()
- Returns:
- The "Referrer-Policy" as provided in the constructor. Never
null.
-
beforeRequest
@Nonnull public com.helger.commons.state.EContinue beforeRequest(@Nonnull javax.servlet.http.HttpServletRequest aHttpRequest, @Nonnull javax.servlet.http.HttpServletResponse aHttpResponse, @Nonnull com.helger.http.EHttpVersion eHttpVersion, @Nonnull com.helger.commons.http.EHttpMethod eHttpMethod)
Description copied from interface:IXServletLowLevelFilterInvoked before an XServlet request is handled. This method is created before the request is created! Exceptions occurring in this method will be propagated to the outside, so be careful :)- Specified by:
beforeRequestin interfaceIXServletLowLevelFilter- Parameters:
aHttpRequest- HTTP servlet request. Nevernull.aHttpResponse- HTTP servlet response. Nevernull.eHttpVersion- HTTP version. Nevernull.eHttpMethod- HTTP method. Nevernull.- Returns:
EContinue.CONTINUEto continue processing, orEContinue.BREAKif this request should not be processed, in which case the HttpServletResponse must contain a valid response!
-
-