chore(config): remove bad retro-compatiblity for HTTP_CONTROL_SERVER_ADDRESS

- Retro-compatible variable key CONTROL_SERVER_ADDRESS was never defined
- Old variable key CONTROL_SERVER_PORT was removed in v3.28.0 and no complain so far
This commit is contained in:
Quentin McGaw
2024-03-23 09:37:54 +00:00
parent b3ceece779
commit 7674efe8d7

View File

@@ -10,22 +10,7 @@ func (s *Source) readControlServer() (controlServer settings.ControlServer, err
return controlServer, err
}
controlServer.Address = s.readControlServerAddress()
controlServer.Address = s.env.Get("HTTP_CONTROL_SERVER_ADDRESS")
return controlServer, nil
}
func (s *Source) readControlServerAddress() (address *string) {
const currentKey = "HTTP_CONTROL_SERVER_ADDRESS"
key := firstKeySet(s.env, "CONTROL_SERVER_ADDRESS", currentKey)
if key == currentKey {
return s.env.Get(key)
}
s.handleDeprecatedKey(key, currentKey)
value := s.env.Get("CONTROL_SERVER_ADDRESS")
if value == nil {
return nil
}
return ptrTo(":" + *value)
}