Forum Discussion
Shashank_Sharma
Nov 14, 2017Altostratus
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_inser...
j_wood_275543
Nov 19, 2017Nimbostratus
If this is a one-time action (say, due to the outcome of an audit) you could change all your HTTP profiles by using a bash script. If you have a list of all the HTTP profiles that you want to change in a text file, you could use the following one-liner at the bash prompt:
for profile in $(cat http_profiles.txt); do tmsh modify ltm profile http $profile insert-xforwarded-for enabled ; done
I don't have a platform in front of me to fully test this, but it should work.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects