Forum Discussion

RRNF5's avatar
RRNF5
Icon for Nimbostratus rankNimbostratus
Sep 12, 2017

Identify large download (Content-Length header) and manually disable ASM

I would like to an irule to identify large download, >50MB (Content-Length header) and manually disable ASM.

 

Any instructions would be much appreciated.

 

2 Replies

  • RRNF5's avatar
    RRNF5
    Icon for Nimbostratus rankNimbostratus

    when HTTP_RESPONSE {

     Check if response content-length is greater than 52428800 (max_filtered_html_length) 
    
    if {([HTTP::header "content-length"] > 52428800) } {  
    
     Disable ASM Processing 
    ASM::disable
         If below the content-length threshold, enable ASM processing
    } else {
    ASM::enable /Common/ASMPOLICYNAME