From 31e2302df8cbe6c1a07dfab02e509ad41e2a8fbc Mon Sep 17 00:00:00 2001 From: Winona Azure <38537084+wiazur@users.noreply.github.com> Date: Tue, 3 Sep 2019 18:14:20 -0700 Subject: [PATCH] Updated key/endpoint Endpoints are not region-based anymore, but rather custom domain -based. Although regional endpoints will still work. Also, the authentication information is moving to a standard of getting it from environment variables. --- nodejs/Search/BingCustomSearchv7.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nodejs/Search/BingCustomSearchv7.js b/nodejs/Search/BingCustomSearchv7.js index 8a1c4b5..15e0f89 100644 --- a/nodejs/Search/BingCustomSearchv7.js +++ b/nodejs/Search/BingCustomSearchv7.js @@ -3,12 +3,12 @@ var request = require("request"); -var subscriptionKey = 'YOUR-SUBSCRIPTION-KEY'; +var subscriptionKey = process.env['BING_CUSTOM_SEARCH_SUBSCRIPTION_KEY'] var customConfigId = 'YOUR-CUSTOM-CONFIG-ID'; var searchTerm = 'microsoft'; var options = { - url: 'https://api.cognitive.microsoft.com/bingcustomsearch/v7.0/search?' + + url: process.env['BING_CUSTOM_SEARCH_ENDPOINT'] + "/bingcustomsearch/v7.0/search?' + 'q=' + searchTerm + '&customconfig=' + customConfigId, headers: {