Skip navigation
Currently Being Moderated

Client Context - Retriving site visitor's IP address?

Jul 20, 2012 12:21 PM

Tags: #client #context

Hi all,

 

Can some one point me to the right direction on how to retrive site visitors IP address?  We are using 5.5.  In the client context it dispaly's NO IP or sometime local host IP.

 

Thanks in advance !!

 
Replies
  • Currently Being Moderated
    Jul 24, 2012 4:26 AM   in reply to cqlearner

    Have u tried both x-forwarded-for & via ? Which version of cq & dispatcher u r using?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 10:11 AM   in reply to Sham HC

    Sham,

     

    In 5.5, the clientheaders has * listed by default:

     

    /clientheaders

          {

          # Forward all request headers that are end-to-end. If you want

          # to forward a specific set of headers, you'll have to list

          # them here.

          "*"

     

    Do you still have to explicitly add

     

    <%=slingRequest.getHeader("x-forwarded-for") %> OR

    <%=slingRequest.getHeader("via") %>

     

    If so, why doesn't "*" account for either scenerio?

     
    |
    Mark as:
  • Currently Being Moderated
    Aug 1, 2012 6:21 PM   in reply to Jayatl

    The clientheaders has no relation with cq5.5 release.  It is the dispatcher version that matters.  From dispatcher 4.1.0 onwards

    The /clientheaders section  supports the "*" wildcard. Please ensure you are using right verion of dispatcher.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points