Package rife.config
Class RifeConfig.EngineConfig
java.lang.Object
rife.config.RifeConfig.EngineConfig
- Enclosing class:
- RifeConfig
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longThe default duration is 20 minutes.static final intThe default frequency is every 20 times out of the scale, with the default scale of 1000 this means, 1/50th of the time.static final intThe default purge scale is 1000.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final booleanstatic final booleanstatic final longstatic final booleanstatic final booleanstatic final Collection<String>static final booleanstatic final booleanstatic final Stringstatic final Charsetstatic final Charsetstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongintintRetrieves the name of the cookie that holds the CSRF token.Retrieves the name of the request header that submits the CSRF token.Retrieves the name of the request parameter that submits the CSRF token.booleanbooleanlongbooleanbooleanbooleanbooleanRetrieves the secret that the engine uses to sign values, like the CSRF tokens of users that are logged in.setContinuationDuration(long duration) setContinuationPurgeFrequency(int frequency) setContinuationPurgeScale(int scale) setCsrfCookieName(String name) setCsrfHeaderName(String name) setCsrfParameterName(String name) setDefaultContentType(String type) setFileUploadPath(String path) setFileUploadSizeCheck(boolean flag) setFileUploadSizeException(boolean flag) setFileUploadSizeLimit(long limit) setGlobalNoCacheHeaders(boolean flag) setGzipCompression(boolean flag) setGzipCompressionTypes(Collection<String> types) setLogEngineExceptions(boolean flag) setPassThroughSuffixes(Set<String> suffixes) setPrettyEngineExceptions(boolean flag) setProxyRootUrl(String url) setRequestEncoding(Charset encoding) setResponseEncoding(Charset encoding) Sets the secret that the engine uses to sign values, like the CSRF tokens of users that are logged in.setWebappContextPath(String path)
-
Field Details
-
DEFAULT_CONTINUATION_DURATION
public static final long DEFAULT_CONTINUATION_DURATIONThe default duration is 20 minutes.- Since:
- 1.0
- See Also:
-
DEFAULT_CONTINUATION_PURGE_FREQUENCY
public static final int DEFAULT_CONTINUATION_PURGE_FREQUENCYThe default frequency is every 20 times out of the scale, with the default scale of 1000 this means, 1/50th of the time.- Since:
- 1.0
- See Also:
-
DEFAULT_CONTINUATION_PURGE_SCALE
public static final int DEFAULT_CONTINUATION_PURGE_SCALEThe default purge scale is 1000.- Since:
- 1.0
- See Also:
-
DEFAULT_DEFAULT_CONTENT_TYPE
- See Also:
-
DEFAULT_PRETTY_ENGINE_EXCEPTIONS
public static final boolean DEFAULT_PRETTY_ENGINE_EXCEPTIONS- See Also:
-
DEFAULT_LOG_ENGINE_EXCEPTIONS
public static final boolean DEFAULT_LOG_ENGINE_EXCEPTIONS- See Also:
-
DEFAULT_FILE_UPLOAD_PATH
-
DEFAULT_FILE_UPLOAD_RIFE_FOLDER
- See Also:
-
DEFAULT_FILE_UPLOAD_SIZE_LIMIT
public static final long DEFAULT_FILE_UPLOAD_SIZE_LIMIT- See Also:
-
DEFAULT_FILE_UPLOAD_SIZE_CHECK
public static final boolean DEFAULT_FILE_UPLOAD_SIZE_CHECK- See Also:
-
DEFAULT_FILE_UPLOAD_SIZE_EXCEPTION
public static final boolean DEFAULT_FILE_UPLOAD_SIZE_EXCEPTION- See Also:
-
DEFAULT_GLOBAL_NO_CACHE_HEADERS
public static final boolean DEFAULT_GLOBAL_NO_CACHE_HEADERS- See Also:
-
DEFAULT_CSRF_COOKIE_NAME
- See Also:
-
DEFAULT_CSRF_PARAMETER_NAME
- See Also:
-
DEFAULT_CSRF_HEADER_NAME
- See Also:
-
DEFAULT_GZIP_COMPRESSION
public static final boolean DEFAULT_GZIP_COMPRESSION- See Also:
-
DEFAULT_GZIP_COMPRESSION_TYPES
-
DEFAULT_PROXY_ROOT_URL
-
DEFAULT_WEBAPP_CONTEXT_PATH
-
DEFAULT_PASS_THROUGH_SUFFIXES
-
DEFAULT_REQUEST_ENCODING
-
DEFAULT_RESPONSE_ENCODING
-
-
Constructor Details
-
EngineConfig
public EngineConfig()
-
-
Method Details
-
getDefaultContentType
-
setDefaultContentType
-
getCsrfCookieName
Retrieves the name of the cookie that holds the CSRF token.This defaults to
DEFAULT_CSRF_COOKIE_NAME.- Returns:
- the name of the CSRF token cookie
- Since:
- 1.10
- See Also:
-
setCsrfCookieName
-
getCsrfParameterName
Retrieves the name of the request parameter that submits the CSRF token.This defaults to
DEFAULT_CSRF_PARAMETER_NAME.- Returns:
- the name of the CSRF token parameter
- Since:
- 1.10
- See Also:
-
setCsrfParameterName
-
getCsrfHeaderName
Retrieves the name of the request header that submits the CSRF token.This defaults to
DEFAULT_CSRF_HEADER_NAME.- Returns:
- the name of the CSRF token header
- Since:
- 1.10
- See Also:
-
setCsrfHeaderName
-
getSecret
Retrieves the secret that the engine uses to sign values, like the CSRF tokens of users that are logged in.There's no secret by default, which means that nothing will be signed.
- Returns:
- the secret; or
nullwhen no secret has been set - Since:
- 1.11.0
- See Also:
-
setSecret
Sets the secret that the engine uses to sign values, like the CSRF tokens of users that are logged in.The secret has to be at least 32 bytes long, and you should keep it out of your sources, for instance by reading it from an environment variable. All the instances of your application have to use the same secret, and it has to stay the same when your application restarts, otherwise the pages that your users had open while logged in can't submit their forms anymore.
- Parameters:
secret- the secret; ornullto sign nothing- Returns:
- this engine configuration
- Since:
- 1.11.0
- See Also:
-
getPrettyEngineExceptions
public boolean getPrettyEngineExceptions() -
setPrettyEngineExceptions
-
getLogEngineExceptions
public boolean getLogEngineExceptions() -
setLogEngineExceptions
-
getFileUploadPath
-
setFileUploadPath
-
getFileUploadSizeLimit
public long getFileUploadSizeLimit() -
setFileUploadSizeLimit
-
getFileUploadSizeCheck
public boolean getFileUploadSizeCheck() -
setFileUploadSizeCheck
-
getFileUploadSizeException
public boolean getFileUploadSizeException() -
setFileUploadSizeException
-
getContinuationDuration
public long getContinuationDuration() -
setContinuationDuration
-
getContinuationPurgeFrequency
public int getContinuationPurgeFrequency() -
setContinuationPurgeFrequency
-
getContinuationPurgeScale
public int getContinuationPurgeScale() -
setContinuationPurgeScale
-
getGlobalNoCacheHeaders
public boolean getGlobalNoCacheHeaders() -
setGlobalNoCacheHeaders
-
getGzipCompression
public boolean getGzipCompression() -
setGzipCompression
-
getGzipCompressionTypes
-
setGzipCompressionTypes
-
getProxyRootUrl
-
setProxyRootUrl
-
getWebappContextPath
-
setWebappContextPath
-
getPassThroughSuffixes
-
setPassThroughSuffixes
-
getRequestEncoding
-
setRequestEncoding
-
getResponseEncoding
-
setResponseEncoding
-