public final class WhiteListedAllowFromStrategy extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log
Logger for use by subclasses
|
Constructor and Description |
---|
WhiteListedAllowFromStrategy(Collection<String> allowed)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
allowed(String allowFromOrigin)
Method to be implemented by base classes, used to determine if the supplied origin
is allowed.
|
String |
getAllowFromValue(javax.servlet.http.HttpServletRequest request)
Gets the value for ALLOW-FROM excluding the ALLOW-FROM.
|
void |
setAllowFromParameterName(String allowFromParameterName)
Sets the HTTP parameter used to retrieve the value for the origin that is allowed
from.
|
public WhiteListedAllowFromStrategy(Collection<String> allowed)
allowed
- the origins that are allowed.protected boolean allowed(String allowFromOrigin)
allowFromOrigin
- the supplied origintrue
if the supplied origin is allowed.public String getAllowFromValue(javax.servlet.http.HttpServletRequest request)
AllowFromStrategy
getAllowFromValue
in interface AllowFromStrategy
request
- the HttpServletRequest
public void setAllowFromParameterName(String allowFromParameterName)
allowFromParameterName
- the name of the HTTP parameter to