Forum Discussion

Srini_87152's avatar
Srini_87152
Icon for Cirrostratus rankCirrostratus
Feb 22, 2017

Restrict POST for uri based

Hi Team,

 

Im looking irule for restrict the POST method based on uri..

 

example: if your coming abc.com/test only allow POST method and rest should reject.

 

1 Reply

  • Untested:

    when HTTP_REQUEST {
    if { ([HTTP::host] eq "abc.com") and ([HTTP::uri] eq "/test") and ([HTTP::method] ne "POST") } {
    reject
    }
    }