Forum Discussion

malakibrahim's avatar
malakibrahim
Icon for Nimbostratus rankNimbostratus
Oct 23, 2019

APM policy based on HTTP host header

Hi

Is there any variable that can match HTTP host header?

I have one VIP that serve multiple application "FQDN" and I need to apply different authentication method based on HTTP host header "FQDN" in the same APM policy.

 

I'm aware that may be i can create multiple policies and use iRule to match the FQDN, but I need to create just one APM policy for simplicity

  • Hi

     

    I thing the default built-in APM variable "session.server.network.name" should also do the trick.

     

    Yoann

  • Hi

    You could save the HTTP Host value as an APM variable when the policy first starts using something like...

    when ACCESS_SESSION_STARTED {
    ACCESS::session data set session.custom.httphost [HTTP::host]
    }

    Then, at the start of you policy, add in an Empty Item that makes a path decision based on the value of this variable.

    Expression: expr {[mcget {session.custom.httphost}] == "portal.test.com"}

  • Hi

     

    I thing the default built-in APM variable "session.server.network.name" should also do the trick.

     

    Yoann