@@ -104,9 +104,6 @@ var clientHelp = `
104104 --header, Set a custom header in the form "HeaderName: HeaderContent".
105105 Use the Token displayed on ODC Portal in using token as HeaderName.
106106
107- --hostname, Optionally set the 'Host' header (defaults to the host
108- found in the server url).
109-
110107 --pid Generate pid file in current working directory
111108
112109 -v, Enable verbose logging
@@ -130,7 +127,7 @@ func client(args []string) {
130127 flags .DurationVar (& config .MaxRetryInterval , "max-retry-interval" , 0 , "" )
131128 flags .StringVar (& config .Proxy , "proxy" , "" , "" )
132129 flags .Var (& headerFlags {config .Headers }, "header" , "" )
133- hostname := flags .String ("hostname" , "" , "" )
130+ hostname := flags .String ("hostname" , "" , "Deprecated, will be ignored " )
134131 pid := flags .Bool ("pid" , false , "" )
135132 verbose := flags .Bool ("v" , false , "" )
136133 flags .Usage = func () {
@@ -169,7 +166,8 @@ func client(args []string) {
169166 }
170167 //move hostname onto headers
171168 if * hostname != "" {
172- config .Headers .Set ("Host" , * hostname )
169+ log .Printf ("[WARN] The --hostname flag will be removed in a future release. Please consider removing it to avoid breaking changes.\n " +
170+ "Please specify the correct server URL directly instead.\n " )
173171 }
174172 //ready
175173 c , err := chclient .NewClient (& config )
0 commit comments