public final class RegExpAllowFromStrategy extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log
Logger for use by subclasses
|
Constructor and Description |
---|
RegExpAllowFromStrategy(String pattern)
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 RegExpAllowFromStrategy(String pattern)
pattern
- the Pattern to compare against the HTTP parameter value. If the
pattern matches, the domain will be allowed, else denied.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