federecio/dropwizard-swagger — pull request #15 by pphatak (2014-07-02 22:54:32+00:00)
Title: Use InetAddress to determine host name instead of defaulting to localhost

When deploying a dropwizard service to a remote host which doesn't have /var/lib/cloud directory, the hostname defaults to localhost. So all the api queries get made to localhost instead of the actual host name.

Example if I have a dropwizard service called blah-001.yammer.com and I deploy this with the swagger bundle and hit blah-001.yammer.com:8080/swagger and use one of the api's say /getName the call gets made to localhost:8080/getName instead of blah-001.yammer.com:8080/getName

Using InetAddress to get the host fixes this issue