Example 2: Adding a Local Client-IP Header
To add a local Client-IP header by using the command line interface
add rewrite action act_ins_client insert_http_header NS-Client 'CLIENT.IP.SRC'
add rewrite policy pol_ins_client 'HTTP.REQ.HEADER("x-forwarded-for").EXISTS || HTTP.REQ.HEADER("client-ip").EXISTS' act_ins_client
bind rewrite global pol_ins_client 300 END
To add a local Client-IP header by using the configuration utility
| Name | Type | Argument(s) |
|---|---|---|
| act_ins_client | insert_http_header | NS-Client 'CLIENT.IP.SRC' |
| Name | Expression | Action |
|---|---|---|
| pol_ins_client | 'HTTP.REQ.HEADER("x-forwarded-for").EXISTS || HTTP.REQ.HEADER("client-ip").EXISTS' | act_ins_client |
| Name | Priority | Goto Expression |
|---|---|---|
| pol_ins_client | 100 | Next |