diff --git a/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts b/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts index 1c9f615bee..8269b5ab47 100644 --- a/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts +++ b/libraries/botbuilder-ai/src/qnamaker-utils/httpRequestUtils.ts @@ -67,14 +67,9 @@ export class HttpRequestUtils { */ private getHeaders(endpoint: QnAMakerEndpoint): any { const headers: any = {}; - const isLegacyProtocol: boolean = endpoint.host.endsWith('v2.0') || endpoint.host.endsWith('v3.0'); - - if (isLegacyProtocol) { - headers['Ocp-Apim-Subscription-Key'] = endpoint.endpointKey; - } else { - headers.Authorization = `EndpointKey ${ endpoint.endpointKey }`; - } + headers['Ocp-Apim-Subscription-Key'] = endpoint.endpointKey; + headers.Authorization = `EndpointKey ${ endpoint.endpointKey }`; headers['User-Agent'] = this.getUserAgent(); headers['Content-Type'] = 'application/json';