Hi Sergey,

On 11/02/2015 03:59 PM, Sergey Beryozkin wrote:
> Does JAX-RS endpoint have an absolute URI address at the initialization time, 
> if so how does it look like ?
Our JAX-RS endpoint is initialized here:
   
https://github.com/OpenNMS/opennms/blob/develop/opennms-webapp-rest/src/main/webapp/WEB-INF/applicationContext-cxf-rest-v1.xml#L32

> In HttpUtils.toAbsoluteUri there's a line which defaults to 'localhost' if it 
> its 127.0.0.1 - I don't recall right now
> why but I vaguely remember I did it in order to address some issue of its own 
> related to the use of 127.0.0.1.
>
> Do you see that line being exercised, if yes I can introduce a property, 
> something like 'preserve.local.ip.address' as
> a short term workaround.
Yeah, that's the block I'm hitting. I came across CXF-5068 when trying to 
diagnose this, maybe we could reuse the
'disable-address-updates' property?

> Though if you say using 0.0.0.0 also leads to a 'localhost' being reported 
> then it is coming out of non-CXF code
> (request.getLocalAddress()) - I'm honestly not sure what can be done in case 
> of '0.0.0.0' to have 127.0.0.1 reported
> instead...
0.0.0.0 is replaced with the IP address (and not 'localhost'), but the problem 
is still the same since the user's
session cookies don't carry over.

Best,
Jesse


Reply via email to