public class CsrfProtectionFilter extends Object implements ClientRequestFilter
org.glassfish.jersey.server.filter.CsrfProtectionFilter
on the server side.Modifier and Type | Field and Description |
---|---|
static String |
HEADER_NAME
Name of the header this filter will attach to the request.
|
Constructor and Description |
---|
CsrfProtectionFilter()
Creates a new instance of the filter with X-Requested-By header value set to empty string.
|
CsrfProtectionFilter(String requestedBy)
Initialized the filter with a desired value of the X-Requested-By header.
|
public static final String HEADER_NAME
public CsrfProtectionFilter()
public CsrfProtectionFilter(String requestedBy)
requestedBy
- Desired value of X-Requested-By header the filter
will be adding for all potentially state changing requests.public void filter(ClientRequestContext rc) throws IOException
filter
in interface ClientRequestFilter
IOException
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.