HTTP:set_auto()
Sets an automatic request or response event.
In HTTP keep-alive mode, by default, FortiADC will automatically re-enable both HTTP_REQUEST and HTTP_RESPONSE event processes for the next transaction even if they have been disabled in the current transaction. Users can disable/enable this automatic behavior using this function.
Syntax
HTTP:set_auto(t);
Arguments
| Name | Description |
|---|---|
|
t |
A table which specifies the event and operation. |
Events
Applicable in the following events:
-
HTTP_REQUEST
-
HTTP_RESPONSE
-
HTTP_DATA_REQUEST
-
HTTP_DATA_RESPONSE
-
BEFORE_AUTH
-
AUTH_RESULT
-
COOKIE_BAKEWAF_REQUEST_BEFORE_SCAN
-
WAF_RESPONSE_BEFORE_SCAN
-
WAF_REQUEST_ATTACK_DETECTED
-
WAF_RESPONSE_ATTACK_DETECTED
Example
when HTTP_REQUEST {
t={};
t["event"] = "data_req";
t["operation"] = "enable";
HTTP:set_auto(t);
}
Note:
The event can be "req", "res", "data_req", "data_res". And the operation can be "enable" and "disable". This command will generate a log if the event or operation is wrong.
Supported Version
FortiADC version 4.8.x and later.