License Type | SaaS & On-Premise |
Agent Mode | Assess & Protect |
Main Product Category | Agents |
Sub Category | Servers |
Question
Why does my server name show up as localhost in the Contrast UI?
Answer
Contrast agents attempt to obtain the name of the server name primarily by using operating system commands to determine the hostname set. In cases where we cannot obtain the server name we set the value to localhost.
Contrast agents allow the customization of the server name.
If you're using a contrast_security.yaml file
server:
name: foo
If you're using environment variables
CONTRAST__SERVER__NAME foo
If you're using JVM arguments
-Dcontrast.server.name=foo
If you're using web.config file for .NET
<configuration> <appSettings> <add key="contrast.server.name" value="foo" /> </appSettings> <system.web> ...