Netsclaer Policy for appending cookies
We often encounter the need to add HTTP header operation, if it is simple to add, delete or replace all is relatively easy, but many times can not delete the original information, just need to add content, which is relatively troublesome. For example, for a user who uses a proxy, the backend server needs to know the IP of multiple proxy servers, and because the NetScaler source address is replaced, the client address needs to be added to the X-forward-for field.
To achieve the above requirements, NetScaler has a append function to quickly operate, to avoid using multiple rewrite to achieve.
There is a append option in the expression that is used to append the argument, which can be the following type
An expression:
For example, the following expression to append a cookie
Test results:
The test page has no cookie,cj=123. The processing of the expression can see that the cookie has been more in the request.
If you want to add a cookie string instead of a trailing append, you can do the following:
Implement a cookie that retains y=1 and adds cj=123 (the string in front of Y=1 will be deleted)
Netsclaer Policy for appending cookies