title: Unable to retrieve X-Forwarded-For in Tomcat 8.0 access log
body: <p>I am injecting a header with a rewrite policy on my LB to pass X-Forwarded-For header. Have verified that this appears on all the pages in the RESPONSE Header. </p>
  
  <p>I have the following config in server.xml , yet i am not able to see the Remote IP/X-Forwarded-For either using %a or %h (I see Loadbalancer IP)</p>
  
  <p>What could be the issue?</p>
  
  <pre><code>            &lt;Valve className="org.apache.catalina.valves.RemoteIpValve"
                internalProxies="10\.202\.13\.198"
                remoteIpHeader="X-Forwarded-For"
                proxiesHeader="x-forwarded-by"
                requestAttributesEnabled="true"
              /&gt;
              &lt;Valve className="org.apache.catalina.valves.AccessLogValve"
                directory="logs"
                prefix="localhost_access_log"
                suffix=".txt"
                pattern="%t %a %h %{Referer}i %l %S %{User-Agent}i %U %s %r %q %A %v %p %b %I %D"
                requestAttributeEnabled="true"
                resolveHosts="false"/&gt;
  </code></pre>
  
  <p>Log ::</p>
  
  <p>[11/May/2016:11:29:39 -0700] 10.202.13.198 10.202.13.198 https:///index.action - 04B3ADCF82A212C6ECD9679BF260732D Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36 /rest/mywork/latest/status/notification/count 200 GET /rest/mywork/latest/status/notification/count HTTP/1.1  10.202.10.17  443 72 http-nio-8443-exec-17 13</p>
  
  <p>As you see : both %a and % h are : 10.202.13.198 10.202.13.198 (my LB IP)</p>