2 Replies Latest reply on Jul 21, 2016 8:49 AM by veli coskun

    Wildfly 10 X-Forwarded-For getting Client IP

    veli coskun Newbie

      Hi

       

      I am Using wildfly 10 on windows Server 2012 R2 and I have a load balancer in front of my Server. I need to get Client Ip's but always getting Load Balancer Ip.

       

       

      Here is my SubSystem config.

       

             <subsystem xmlns="urn:jboss:domain:undertow:3.0">

                  <buffer-cache name="default"/>

                  <server name="default-server">

                      <http-listener name="default" proxy-address-forwarding="true" socket-binding="http"/>

                      <host name="default-host" alias="localhost, bikilanapp, 127.0.0.1">

                          <location name="/" handler="welcome-content"/>

                          <location name="/sitemap" handler="XmlDirHandler"/>

                         

      <!--

      <access-log pattern="%{i,X-Forwarded-For} %h %l %u [%t] &quot;%r&quot; %s %b &quot;%{i,Referer}&quot; &quot;%{i,User-Agent}&quot;"/>

      <filter-ref name="request-dumper"/>

      -->

      <filter-ref name="server-header"/>

                          <filter-ref name="x-powered-by-header"/>

       

                      </host>

                  </server>

                  <servlet-container name="default">

                      <jsp-config/>

                      <websockets/>

                  </servlet-container>

                  <handlers>

                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

                      <file name="XmlDirHandler" follow-symlink="true" directory-listing="true" cache-buffers="1024" cache-buffer-size="1024" path="c:\test\"/>

                  </handlers>

                  <filters>

      <response-header name="server-header" header-name="Server" header-value="WildFly/10"/>

                      <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>

      <!--

      <filter name="request-dumper" class-name="io.undertow.server.handlers.RequestDumpingHandler" module="io.undertow.core" />

      -->

                  </filters>

              </subsystem>

       

       

      can you please help me.

       

      Thak you.