Getting Hostname IDP is running on

Christopher Bland chris at fdu.edu
Fri Aug 9 13:41:38 EDT 2019


Hi All,

I have setup a cluster of v3.4.4 IDP servers sitting behind a load balancer. I am looking to tag my login pages so I know which server a user hit if there’s a problem.  I have looked at Request.getServerName() and Request.getIPAddress() which are both part of HttpServletResponse.  Unfortunately because my serves are behind a load balancer when I call either method I can only see the IP address and DNS name on the load balancer and. not the actual server name.  While I am not a Java programmer,  I have been digging into possible solutions and I think I need to access the java.net.InetAddress class so I can call getLocalHost() and/or getHostName().

I am assuming that java.net.* is part of the default context.  If not is it recommended to add it?  I think I can  context.put("InetAddress",  InetAddress.class); to add InetAddress to the context.  Additionally, if java.net.* is part of the default context do I access it via context.getLocalHost()?

I welcome all suggestion and thoughts,

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20190809/a0af5ecf/attachment.html>


More information about the users mailing list