Forum Discussion

Waynengi's avatar
Waynengi
Icon for Nimbostratus rankNimbostratus
Jan 06, 2018

Does particular irule need to be tweaked?

Created an irule below but it only seems to work for lowercase not uppercase. Do I have to add another line or can it be tweaked to catch anything? "coordinatororporttype"

 

when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains "/wls-wsat/coordinatorporttype" } { log local0. "matched URI [HTTP::uri]" drop } }

 

21 Replies

  • it should also work for the uppercase. can you try to add logging before the if sentence?

    e.g.

    log local0. "URI is [HTTP::uri]"
    
    • nitass's avatar
      nitass
      Icon for Employee rankEmployee

      e.g.

      when HTTP_REQUEST { 
        log local0. "URI is [HTTP::uri]"
        if { [string tolower [HTTP::uri]] contains "/wls-wsat/coordinatorporttype" } { 
          log local0. "matched URI [HTTP::uri]" 
          drop 
        } 
      }
      
    • Waynengi's avatar
      Waynengi
      Icon for Nimbostratus rankNimbostratus

      I'll do some testing. I take that will show in the log file of what's happening. Right?

       

  • it should also work for the uppercase. can you try to add logging before the if sentence?

    e.g.

    log local0. "URI is [HTTP::uri]"
    
    • nitass_89166's avatar
      nitass_89166
      Icon for Noctilucent rankNoctilucent

      e.g.

      when HTTP_REQUEST { 
        log local0. "URI is [HTTP::uri]"
        if { [string tolower [HTTP::uri]] contains "/wls-wsat/coordinatorporttype" } { 
          log local0. "matched URI [HTTP::uri]" 
          drop 
        } 
      }
      
    • Waynengi's avatar
      Waynengi
      Icon for Nimbostratus rankNimbostratus

      I'll do some testing. I take that will show in the log file of what's happening. Right?

       

  • oguzy's avatar
    oguzy
    Icon for Cirrostratus rankCirrostratus

    You check the ltm log using "tail -f" parameter, right?