Forum Discussion
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
- iaineNacreous
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"}
- malakibrahimNimbostratus
Thank you for explaining it by screenshot, nice to see how to set custom variables and match in APM policy. but also as said ""session.server.network.name" can match it.
- Yoann_Le_Corvi1Cumulonimbus
Hi
I thing the default built-in APM variable "session.server.network.name" should also do the trick.
Yoann
Recent Discussions
Related Content
* 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