For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Mandragor's avatar
Mandragor
Icon for Altostratus rankAltostratus
Aug 16, 2017

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?

 

1 Reply

  • Hello Mandragor,

    Based on this article https://support.f5.com/csp/article/K15434

    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