How to use pycontrol to enable X-Forwarded-For for a list of HTTP Profiles?
Hi,
I am trying to set the value of "Insert X-Forwarded-For" to "Enabled" for a list of HTTP Profiles. Can someone please help me figure out either one of the 2 methods:
1) Using "set_insert_xforwarded_for_header_mode" in Pycontrol. How should the Profile Mode list be defined? (Reference- https://devcentral.f5.com/wiki/iControl.LocalLB__ProfileHttp__get_insert_xforwarded_for_header_mode.ashx)
2) Using the REST API to make a POST call. What should be the value for- "URL", "HEADERS", and "PAYLOAD" to make this call?
For more context, we are updating configurations to add client IP information in our logs. I'm able to retrieve the current configuration of our virtual servers, HTTP Profiles and the value of Insert X-Forwarded-For flag. The next step is to update this flag to Enabled.
Please advise.
-Thank You
Shashank