URI list syntax for http compression

We have a VIP that hosts different applications on different path-elements, like .. and so on.

I would like to enable http compression only on /app1/* requests, but setting /app1/* in the URI include list for the http compression profile does not result in compresssion on such requests. If I change it to /* I do get compression, but obviously for all requests regardless of URI.

What is the proper syntax here?

Hello Mandragor,

Based on this article myF5

You have two options :

  • you want to manage the compression from an irule ---> then you must “check” the option “Selective Compression” from your HTTP Compression profile.
  • you want to manage it directly from the profile ---> then you keep the “Selective Compression” as it is (by default unchecked)

If you go with first option try this irule :

when HTTP_REQUEST {

    if { [string tolower [HTTP::path]] starts_with "/app1/" } {
        COMPRESS::enable
    } elseif { [string tolower [HTTP::path]] starts_with "/app2/" } {

    }

}

Hope it helps

Regards