HTTP:redirect_with_cookie(url, cookie)
Redirects an HTTP request or response to the specified URL with cookie.
Supports multiple redirect
Syntax
HTTP:redirect_with_cookie(url, cookie);
Arguments
| Name | Description |
|---|---|
|
url |
A string which specifies the redirect url. |
|
cookie |
A string as cookie. |
Events
Applicable in the following events:
-
BEFORE_AUTH
-
HTTP_DATA_REQUEST
-
HTTP_REQUEST
-
HTTP_RESPONSE
-
WAF_REQUEST_ATTACK_DETECTED
-
WAF_REQUEST_BEFORE_SCAN
-
WAF_RESPONSE_ATTACK_DETECTED
-
WAF_RESPONSE_BEFORE_SCAN
Note: Cannot be used in HTTP_DATA_RESPONSE.
Example
HTTP:redirect_with_cookie("www.example.com", "server=nginx")
HTTP:redirect_with_cookie("www.abc.com", "server=nginx")
The final redirection is to www.abc.com with the cookie "server=nginx".
Supported Version
FortiADC version 4.8.x and later.