title: Get real client IP address in Spring Cloud Gateway
body: <p>I implement rate limiting in Spring Cloud Gateway (SCG). I get client IP address with below code</p>
  <pre><code>@Component
  public class RemoteAddressKeyResolver implements KeyResolver {
      @Override
      public Mono&lt;String&gt; resolve(ServerWebExchange exchange) {
          return Mono.just(exchange.getRequest().getRemoteAddress().getAddress().getHostAddress());
      }
  }
  </code></pre>
  <p>My SCG is behind a proxy so it gets address of proxy not real client address. How can I get real client address?</p>