Forum Discussion
1 Reply
Sort By
- Jason_Cohen_417Historic F5 Account
Are you simply adding an X-Forwarded-For header? If that is all you are doing, you could probably do that with a setting in the HTTP profile.
However, for the sake of answering the "attach a rule" question, this answer may have the information you are looking for.
https://devcentral.f5.com/questions/python-sdk-assign-irules-to-a-virtual-server-51173
Copied here for simplicity.
>>> vip = b.tm.ltm.virtuals.virtual.load(name='testvip') >>>vip.rules [u'/Common/tcptest'] >>> vip.rules = ['/Common/tcptest', '/Common/platform_info'] >>> vip.update() >>vip.rules [u'/Common/tcptest', u'/Common/platform_info']