public class CsrfProtectionFilter
extends java.lang.Object
implements javax.ws.rs.client.ClientRequestFilter
org.glassfish.jersey.server.filter.CsrfProtectionFilter
on the server side.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HEADER_NAME
Name of the header this filter will attach to the request.
|
private static java.util.Set<java.lang.String> |
METHODS_TO_IGNORE |
private java.lang.String |
requestedBy |
Constructor and Description |
---|
CsrfProtectionFilter()
Creates a new instance of the filter with X-Requested-By header value set to empty string.
|
CsrfProtectionFilter(java.lang.String requestedBy)
Initialized the filter with a desired value of the X-Requested-By header.
|
Modifier and Type | Method and Description |
---|---|
void |
filter(javax.ws.rs.client.ClientRequestContext rc) |
public static final java.lang.String HEADER_NAME
private static final java.util.Set<java.lang.String> METHODS_TO_IGNORE
private final java.lang.String requestedBy
public CsrfProtectionFilter()
public CsrfProtectionFilter(java.lang.String requestedBy)
requestedBy
- Desired value of X-Requested-By header the filter
will be adding for all potentially state changing requests.