public class ContainerConfig
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_URI_ENCODING |
| Constructor and Description |
|---|
ContainerConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomDomain(java.lang.String name)
Adds a new custom domain name to the list of allowed domains
|
void |
addValidFilePath(java.lang.String filePath)
Adds a new base path to the list of allowed paths.
|
static ContainerConfig |
defaultConfig() |
void |
enableLocalhost()
Enables localhost custom domain name for testing.
|
java.util.List<java.lang.String> |
getCustomDomainNames()
Returns the list of custom domain names enabled for the application
|
java.lang.String |
getServiceBasePath()
Returns the base path configured in the container.
|
java.lang.String |
getUriEncoding() |
java.util.List<java.lang.String> |
getValidFilePaths()
Returns the list of file paths that the servlet accepts read/write requests to
|
boolean |
isConsolidateSetCookieHeaders() |
boolean |
isQueryStringCaseSensitive()
Whether query string parameters in the request should be case sensitive or not.
|
boolean |
isStripBasePath() |
boolean |
isUseStageAsServletContext()
Tells whether the stage name passed in the request should be added to the context path:
AwsProxyHttpServletRequest.getContextPath(). |
void |
setConsolidateSetCookieHeaders(boolean consolidateSetCookieHeaders)
Tells the library to consolidate multiple Set-Cookie headers into a single Set-Cookie header with multiple, comma-separated values.
|
void |
setQueryStringCaseSensitive(boolean queryStringCaseSensitive)
Sets whether query string parameter names should be treated as case sensitive.
|
void |
setServiceBasePath(java.lang.String serviceBasePath)
Configures a base path that can be stripped from the request path before passing it to the framework-specific implementation.
|
void |
setStripBasePath(boolean stripBasePath)
Whether this framework should strip the base path mapping specified with the
setServiceBasePath(String) method from a request before
passing it to the framework-specific implementations |
void |
setUriEncoding(java.lang.String uriEncoding)
Sets the charset used to URLEncode and Decode request paths.
|
void |
setUseStageAsServletContext(boolean useStageAsServletContext)
Sets whether the API Gateway stage name should be included in the servlet context path.
|
void |
setValidFilePaths(java.util.List<java.lang.String> validFilePaths)
Sets a list of valid file paths for the servlet to read/write from.
|
public static final java.lang.String DEFAULT_URI_ENCODING
public static ContainerConfig defaultConfig()
public java.lang.String getServiceBasePath()
setStripBasePath(boolean) to route
the request. When requesting the context path from an HttpServletRequest: AwsProxyHttpServletRequest.getContextPath() this base path is added
to the context even though it was initially stripped for the purpose of routing the request. We decided to add it to the context to address GitHub issue
#84 and allow framework's link builders to it.public void setServiceBasePath(java.lang.String serviceBasePath)
serviceBasePath - The base path mapping to be removed.public boolean isStripBasePath()
public void setStripBasePath(boolean stripBasePath)
setServiceBasePath(String) method from a request before
passing it to the framework-specific implementationsstripBasePath - public java.lang.String getUriEncoding()
public void setUriEncoding(java.lang.String uriEncoding)
uriEncoding - The charset. By default this is set to UTF-8public boolean isConsolidateSetCookieHeaders()
public void setConsolidateSetCookieHeaders(boolean consolidateSetCookieHeaders)
consolidateSetCookieHeaders - Whether to consolidate the cookie headers or not.public boolean isUseStageAsServletContext()
AwsProxyHttpServletRequest.getContextPath().public void setUseStageAsServletContext(boolean useStageAsServletContext)
useStageAsServletContext - true if you want the stage to appear as the root of the context path, false otherwise.public java.util.List<java.lang.String> getValidFilePaths()
public void setValidFilePaths(java.util.List<java.lang.String> validFilePaths)
validFilePaths - A populated list of base pathspublic void addValidFilePath(java.lang.String filePath)
filePath - The base pathpublic void addCustomDomain(java.lang.String name)
name - The new custom domain name, excluding the scheme ("https") and portpublic java.util.List<java.lang.String> getCustomDomainNames()
public void enableLocalhost()
public boolean isQueryStringCaseSensitive()
false for backward compatibility.true if the parameter matching algorithm is case sensitivepublic void setQueryStringCaseSensitive(boolean queryStringCaseSensitive)
false for backward compatibility.queryStringCaseSensitive - Tells the framework to treat query string parmaeter names as case sensitiveCopyright © 2018. All Rights Reserved.