Forum Discussion

ascherer_304302's avatar
ascherer_304302
Icon for Nimbostratus rankNimbostratus
Dec 27, 2016

apm_mobile css file not used on in app browsers

Hey everyone,

 

The company I'm working at has multiple apps rolled out that use a SAML Authentication with our F5 being the IDP. In these apps the login page is styled with the normal browser css (apm_full.css) file and not the mobile css file (apm_mobile.css). If I open the authentication site from the phone browser the correct mobile css file is used.

 

My question now what is metric f5 looks at to decide if the mobile css file needs to be used or the normal css file ? Is it possible to force the mobile css somehow ?

 

Thanks, Andreas

 

  • popica's avatar
    popica
    Icon for Nimbostratus rankNimbostratus

    Hi Guys - did you figure out why apm_mobile.css is not loading for mobile devices?? (having issues especially android/chrome). Is there a workaround or anyone made it work on mobile? Please advise. THX

  • Lucas_Thompson_'s avatar
    Lucas_Thompson_
    Historic F5 Account

    There is a session variable that's set when the user connects It's basically a logic decision based on the combination of the HTTP POST information and User-Agent that begins the connection.

    Then there is a PHP switcher for delivering whatever CSS version (/var/sam/www/php_include/webtop/renderer/customization/general_ui/default_general_ui/en/apm.css):

    Don't edit that file because your changes will be destroyed on any upgrade.

    The logic looks like this:

    $name = "apm_full.css";
    switch( $_GET["uimode"] ){
        case 7: if( $_GET["cplatform"] == "MacOS" ){ $name = "apm_edge.css"; } break;
        case 9: $name = "apm_mobile.css"; break;
    }
    include( $name );
    

    "uimode" is set to those numbers depending on a combination of the user agent and any POST data received.

    • Lucas_Thompson_'s avatar
      Lucas_Thompson_
      Historic F5 Account

      Let's get a support ticket opened for this one so that the issue can be fully characterized. With this detailed understanding of the problem, it will be easy for support to help. Just be sure to provide the exact User-Agent and what the uimode session variable gets set to.

       

      You can access (read) the session variables from an irule as long as they exist, but there are some gotchas with writing them depending on the specific time you're doing it and for what purpose.

       

    • ascherer_304302's avatar
      ascherer_304302
      Icon for Nimbostratus rankNimbostratus

      I've looked around and it seems like I'm not able to access the session variables from an irule

       

      Since the app that is opening the login is a branded one we can manipulate the the User Agent string. Do you know what specific the logic switch is looking at ? Then it would be possible to manipulate either the http post values or the user agent string

       

      Thanks

       

    • Lucas_Thompson_'s avatar
      Lucas_Thompson_
      Historic F5 Account

      I don't think so, but you can give it a shot.

       

      This issue sounds like a defect. User-Agent strings are always changing and unfortunately APM doesn't have a dynamically configurable map of what user-agent matches what uimode/etc. This feature has been (and continues to be) requested in different use cases.