Fortinet white logo
Fortinet white logo

Script Reference Guide

Run multiple scripts

Run multiple scripts

You can run multiple scripts in FortiADC. When running multiple scripts, you may set a priority number for each script. FortiADC will run them in order from lowest priority to highest priority. The default priority is 500. If two scripts have the same priority number, they will be executed in the order in which they were added.

Run multiple scripts:
--script 1:
when HTTP_REQUEST priority 500 {
LB:routing("cr1")
}
--script 2:
when HTTP_RESPONSE priority 500 {
HTTP:close()
}
--script 3:
when HTTP_REQUEST priority 400 {
LB:routing("cr2")
}
--script 4:
when HTTP_RESPONSE priority 600 {
HTTP:close()
}

Run multiple scripts

Run multiple scripts

You can run multiple scripts in FortiADC. When running multiple scripts, you may set a priority number for each script. FortiADC will run them in order from lowest priority to highest priority. The default priority is 500. If two scripts have the same priority number, they will be executed in the order in which they were added.

Run multiple scripts:
--script 1:
when HTTP_REQUEST priority 500 {
LB:routing("cr1")
}
--script 2:
when HTTP_RESPONSE priority 500 {
HTTP:close()
}
--script 3:
when HTTP_REQUEST priority 400 {
LB:routing("cr2")
}
--script 4:
when HTTP_RESPONSE priority 600 {
HTTP:close()
}