nerdexam
(ISC)2

301B · Question #192

A customer needs to intercept all of the redirects its application is sending to clients. When a redirect is matched, the customer needs to log a message including the client IP address. Which iRule…

The correct answer is D. when HTTP_RESPONSE { if {[HTTP::is_redirect]} { log local0. "redirecting client ip address [IP::addr [IP::remote_addr]]" } }. See the full explanation below for the reasoning.

Question

A customer needs to intercept all of the redirects its application is sending to clients. When a redirect is matched, the customer needs to log a message including the client IP address. Which iRule should be used?

Options

  • Awhen HTTP_RESPONSE { if {[HTTP::is_3xx]} { log local0. "redirecting client ip address [IP::addr [IP::remote_addr]]" } }
  • Bwhen HTTP_REQUEST { if {[HTTP::is_301]} { log local0. "redirecting client ip address [IP::addr [IP::remote_addr]]" } }
  • Cwhen HTTP_REQUEST { if {[HTTP::is_redirect]} { log local0. "redirecting client ip address [IP::addr [IP::remote_addr]]" } }
  • Dwhen HTTP_RESPONSE { if {[HTTP::is_redirect]} { log local0. "redirecting client ip address [IP::addr [IP::remote_addr]]" } }

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    17% (4)
  • D
    71% (17)

Community Discussion

No community discussion yet for this question.

Full 301B Practice