Local Traffic Policy to Remove a HTTP Header

Hello,

Question: How to properly set up a Local Traffic Policy to remove HTTP header named ‘Server’ on HTTP RESPONSE? Note that the Server header may or may not exist in the response. It’s an unversal policy for all Virtual Servers which also means the value for this header cannot be predicted. Can I set up a condition to trigger an action only if the header itself exists (without specifying any additional equals/starts-with/ends-with/contains as the Condition)?

In case of my current solution, all works fine, except that when the Server header is not present in response, an error message is logged to /var/log/ltm. It’s cosmetic but annoying due to high volume of errors.

.. irrelevant policy stuff (no conditions apply to action 0)
      rule_remove-server-header {
        actions {
            0 {
                http-header
                response
                remove
                name Server
            }
        }
        ordinal 2
    }

Thanks,

We have EXACTLY the same issue! And we do not want to use IRule!

I’ve opened an RFE to add new functionality to LTM Local Traffic Policy. I will update if they make a decision.

I see two possible solutions here: 1. Add new functionality as requested (New condition “exists” in the rule configuration section). 2. Fine-tune the existing functionality so that there will be no execution errors when the headers to be removed are not present in response.

The RFE was accepted and it will be addressed in a future public hotfix.

Subject: Regarding Service Request 1-1849471431 | Request for Enchancement
This has been accepted and will be followed under BUGID 554444. This possibly will be fixed in 11.5.4 HF1.