org.springframework.boot spring-boot-starter-parent 2.3.2.RELEASE

@Bean
    @ConfigurationProperties(prefix = "server.undertow")
    UndertowServletWebServerFactory embeddedUndertowWebFactory(@Value("${server.port}") Integer port) {

        UndertowServletWebServerFactory factory = new UndertowServletWebServerFactory();
        factory.setPort(port);
        factory.addDeploymentInfoCustomizers(deploymentInfo ->
        {
            deploymentInfo.addInitialHandlerChainWrapper(handler -> {
                PathHandler pathHandler = Handlers.path().addPrefixPath("/",handler);
                Map<String, HandlerProxy> apiContainer = facadeProcessor.getApiContainer();
                for(Map.Entry<String, HandlerProxy> entry : apiContainer.entrySet()){
                    String uri = entry.getKey();
                    HandlerProxy invocation = entry.getValue();
                    pathHandler.addPrefixPath(uri,addFormParsing(new CubeHttpHandler(uri,invocation,loginService,appInfoService)));
                }
                return pathHandler;
                }
            );

        });

        return factory;
    }

String ip = ExchangeAttributes.remoteIp().readAttribute(exchange);

this ip is 127.0.0.1

Comment From: wilkinsona

The code involved in determine the remote IP is provided by Undertow. Also, as mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. As such, I don't think this is the right place for this.

You may want to follow up on Stack Overflow which is a better place for questions such as this. If you do so, I'd recommend provided a complete yet minimal example that reproduces the problem including details of how the request is being made.