I'm trying to get the host name of the for the machine I am running on in Heroku. What i want to get is something like this: https://gentle-hollows-7643-243.com
What I am using right now is the getCannoncialHostName inside of the InetAddress
class. This is giving me a value like this:
String hostName = java.net.InetAddress.getLocalHost.getCannonicalHostName
//returns the following
//be24dfaf-671d-4c37-8468-e1826ea26507.prvt.dyno.rt.heroku.com
This is not what I am expecting to receive, which is https://gentle-hollows-7643-243.com
Am I misunderstanding the intent for getCannonicalHostName
or is this working incorrectly because the Heroku architecture?