Spring ReactorServerHttpRequest to use hostAddress() instead of parsing the Why not just use the original hostaddress first?

Comment From: rstoyanchev

It looks like that change 5cac619e237f8f71208142ad78c06a7d15b34c72 predates hostAddress that became available later with https://github.com/reactor/reactor-netty/commit/7ae2a8e29a9c51f1c95e9f1bb43bd4a5866b3150.

Perhaps we can now simplify this a bit. What do you think @bclozel, @violetagg?

Comment From: rstoyanchev

Tentatively scheduling for 5.3 M1.

Comment From: violetagg

@rstoyanchev Yes I think you can use hostAddress (if forwarded is enabled the corresponding headers information will be applied)

Comment From: spurtAndy

thank you

Comment From: bclozel

Reopening since it seems this hasn't been done.

Comment From: bclozel

We won't apply this change.

The initial implementation was, on purpose, looking at the host header to build the request URL. If we apply this change, we will use the network interface address instead of the logical host address provided in the header.

A simple application running locally will show that applying such a change will turn the request URL from "http://localhost:8080/" into "http://[0:0:0:0:0:0:0:1]:8080/". In production, this might turn "https://example.org/resource" into "https://10.10.10.1:8080/resource".

I'm declining this issue as a result.