ltm rule command ADAPT enable
iRule(1) BIG-IP TMSH Manual iRule(1)
ADAPT::enable
Enables, disables or returns the enable state.
SYNOPSIS
ADAPT::enable (ADAPT_CTX)? (ADAPT_SIDE)? (BOOLEAN)?
DESCRIPTION
The ADAPT::enable command enables, disables or returns the enable state of the ADAPT filter on the current or
specified side of the virtual server connection for which the iRule is being executed.
Syntax
A value may be described by any of these notations:
* 0 / 1
* false / true
* disable / enable (recommended)
* no / yes
ADAPT::enable []
* Gets the enable state for the current side
ADAPT::enable [] request
* Gets the enabled state for the request-adapt side
ADAPT::enable [] response
* Gets the enabled state for the response-adapt side
ADAPT::enable []
* Disable or enable the current side
ADAPT::enable [] request
* Disable or enable the request-adapt side
ADAPT::enable [] response
* Disable or enable the response-adapt side
The optional argument applies the command to a specific context. Useful when there are dynamic
contexts. If "request" or "response" is specified, the context must be on the appropriate side (client or
server, respectively).
RETURN VALUE
Returns the current of modified enable state.
VALID DURING
HTTP_REQUEST, HTTP_RESPONSE, HTTP_PROXY_REQUEST, ADAPT_REQUEST_RESULT, ADAPT_RESPONSE_RESULT
EXAMPLES
when HTTP_REQUEST {
ADAPT::enable true
ADAPT::enable response false
}
when HTTP_RESPONSE {
if { [HTTP::header "Content-Type"] contains "image" } {
ADAPT::enable true
}
if { [HTTP::header "Content-Type"] contains "video" } {
ADAPT::enable true
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-11.3.0 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)