]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: httpclient/cli: access should be only done from expert mode
authorWilliam Lallemand <wlallemand@haproxy.org>
Tue, 19 Oct 2021 08:58:30 +0000 (10:58 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 19 Oct 2021 13:02:42 +0000 (15:02 +0200)
Only enable the usage of the CLI HTTP client in expert mode.

src/http_client.c

index cfbff1913a81c38ff6d5dc85dc135ed014060acf..f298fe11327023149cab6c6eddcd604cdbf53506 100644 (file)
@@ -236,7 +236,7 @@ static void hc_cli_release(struct appctx *appctx)
 
 /* register cli keywords */
 static struct cli_kw_list cli_kws = {{ },{
-       { { "httpclient", NULL }, "httpclient <method> <URI>   : launch an HTTP request", hc_cli_parse, hc_cli_io_handler, hc_cli_release},
+       { { "httpclient", NULL }, "httpclient <method> <URI>   : launch an HTTP request", hc_cli_parse, hc_cli_io_handler, hc_cli_release,  NULL, ACCESS_EXPERT},
        { { NULL }, NULL, NULL, NULL }
 }};