Forum Discussion
APM VPE Top left logo - any way to dynamically change it per host?
I have a large VPE that I'm splitting across two sharepoint teams using session.server.network.name and two branch rules. Each SP team has a respective logo/badge for their SP sites for their team. I'd like the 4 four possible logon pages to reflect each team if/when accessed in the VPE. Is there a way to dynamically change this image based on Logon page? or am I limited to a single image per access policy?
- iaine
Nacreous
Hi
As long as you have got a way to distinguish which team is accessing APM prior to presenting them with a login page then you can change the logo as you need to. For instance, you mention that you are using variable session.server.network.name to split up your policy. Using this variable you could deploy code such as this to intercept the call for the logo on the login page and display a different image.
when CLIENT_ACCEPTED { ACCESS::restrict_irule_events disable } when HTTP_REQUEST { looks for calls to the logo image if {[HTTP::uri] equals "/public/images/my/flogo.png"}{ if {[ACCESS::session data get "session.server.network.name"] eq "test.domain.com"}{ HTTP::respond 200 content [ifile get "uri1_image"] } elseif { [ACCESS::session data get "session.server.network.name"] eq "another.domain.com"}{ HTTP::respond 200 content [ifile get "uri2_image"] } } }
Hi Eric,
I agree with with Stanislas that
may have certain side effects.ACCESS::restrict_irule_events disable
I would rather than change the image path based on a custom APM session variable. The value of the session variable would be set during the
event.ACCESS_SESSION_STARTED
when ACCESS_SESSION_STARTED { set apm_policy_name "/Common/MyPolicy" switch -glob -- [string tolower [HTTP::host]] { "site1.domain.de" { ACCESS::session data set "session.custom.logo" "/public/images/customization${policy_name}_general_ui/image01_en.png" } "site2.domain.com" { ACCESS::session data set "session.custom.logo" "/public/images/customization${policy_name}_general_ui/image02_en.png" } default { ACCESS::session data set "session.custom.logo" "/public/images/customization${policy_name}_general_ui/image00_en.png" } } }
The required change to the
file via "Advanced Customization" would be:header.inc
... ...
After that you could upload your default and site specific logo images to APMs "Advanced Customization Images" via the "General Customization" functionality. Image00 would be the new default image and image01 etc. are the site specific logo images.
Cheers, Kai
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