This module determines the servers internal host name, and then creates a response header for you.
This module is ideal for clustered setups, or docker swarms, where the code could be running on one of many servers. In Docker, can you search for this hostname in portainer or via the CLI, making debugging much easier
The module sets a header called
The module listens to the onRequestCapture ColdBox interception point.
With Errors, this function might not run... if that interception point is not announced. You might need to add to your Application.cfc directly if errors occur before the ColdBox framework loads.
This module looks for the hostname a few different ways.
var inet = CreateObject("java", "java.net.InetAddress"); var hostname = inet.getLocalHost().getHostName();