Script Events
There are predefined scripts that specify the following events. When the events occur, it will trigger the system to take the actions defined in the script.
|
Type |
Event |
Trigger event |
|---|---|---|
| RULE |
RULE_INIT |
When the server policy enables or reloads. |
|
RULE_EXIT |
When the server policy disables or reloads. | |
| HTTP |
HTTP_REQUEST |
When the server policy has received the complete HTTP request header. |
|
HTTP_RESPONSE |
When the server policy has received the complete HTTP response header. | |
|
HTTP_DATA_REQUEST |
When an |
|
| HTTP_DATA_RESPONSE | When an HTTP:collect command finishes processing on the server side of a connection. |
|
| TCP |
CLIENT_ACCEPTED |
When the server policy has accepted a client connection. |
|
CLIENT_CLOSED |
When the server policy has closed a client connection. | |
|
SERVER_CONNECTED |
When the server policy has connected to a server. | |
|
SERVER_CLOSED |
When the server policy has closed a server connection. |
|
|
SSL
|
CLIENTSSL_HANDSHAKE |
When a client-side SSL handshake is completed. |
|
SERVERSSL_HANDSHAKE |
When a server-side SSL handshake is completed. |
|
|
SERVERSSL_CLIENTHELLO_SEND |
When the system is about to send its SSL ClientHello message. |
|
|
CLIENTSSL_SERVERHELLO_SEND |
When the system is about to send its SSL ServerHello message on the clientside connection. |
|
|
CLIENTSSL_RENEGOTIATE |
When a client-side (Client to FortiWeb) SSL renegotiation is completed |
Event priority
FortiWeb supports multiple scripts in one server policy. When a server policy with scripts is enabled, the system will load scripts one by one. If there are multiple same events defined in the scripts, the event running order is same as the loading order.
If you want to run a certain event first regardless of the script order, you can define its priority to prioritize its sequence. The default priority of events is 500. Lower value has higher priority.
For example:
when HTTP_REQUEST priority 499 {
...
}