diff --git a/pkg/apiutil/apiutil.go b/pkg/apiutil/apiutil.go index e0ea437daff9..12e6d6f0577b 100644 --- a/pkg/apiutil/apiutil.go +++ b/pkg/apiutil/apiutil.go @@ -37,7 +37,7 @@ var ( ======= // ComponentSignatureKey is used for http request header key // to identify component signature - ComponentSignatureKey = "ti-component" + ComponentSignatureKey = "component" // ComponentAnonymousValue identify anonymous request source ComponentAnonymousValue = "anonymous" >>>>>>> baa5163b (close #4490: add teset) diff --git a/tools/pd-ctl/pdctl/command/global.go b/tools/pd-ctl/pdctl/command/global.go index 8c145895db74..a9c19ee7e443 100644 --- a/tools/pd-ctl/pdctl/command/global.go +++ b/tools/pd-ctl/pdctl/command/global.go @@ -37,9 +37,17 @@ import ( ) var ( +<<<<<<< HEAD pdControllerComponentName = "pdctl" dialClient = &http.Client{ Transport: apiutil.NewComponentSignatureRoundTripper(http.DefaultTransport, &pdControllerComponentName), +======= + dialClient = &http.Client{ + Transport: &apiutil.UserSignatureRoundTripper{ + Component: "pdctl", + Proxied: http.DefaultTransport, + }, +>>>>>>> 377c854c (close #4490: fix transport and change component key) } pingPrefix = "pd/api/v1/ping" )