Forum Discussion

Albert__Tase_70's avatar
Albert__Tase_70
Icon for Nimbostratus rankNimbostratus
May 18, 2007

inserting a name and client ip address into the header

HTTP::header insert "NPG_SRC_ADDR:${client_addr}"

 

will :$(client_addr) insert the client ip or will it just insert everything in the quote marks ?

4 Replies

  • ${client_addr} is the syntax used in 4.x for the client IP address. You can use [IP::client_addr] to refer to the client IP address in 9.x.

     

     

    Aaron
  • I think you're missing the second colon in "HTTP::header" and "IP::client_addr".

     

     

    The iRuler should give pretty specific indications of what errors it finds when parsing the rule.

     

     

    For example, this error is noting that HTTP:header is an unknown procedure. Likewise for IP:client_addr.

     

     

    "line 10: [undefined procedure: HTTP:header] [HTTP:header insert "NPG_SRC_ADDR" [IP:client_addr]]"

     

     

    Aaron
  • Your IP::client_addr is still missing a : , as Aaron has already pointed out in his previous post.