Closed abalbin closed 5 years ago
Hi @abalbin, can't you just set connectionPolicy.ProxyUrl that you pass on to the documentClient ?
Hey @srinathnarayanan, the thing is that we are using the DocumentDbClient from botbuilder-azure and there documentClient is instantiated like this:
var documentdb_1 = require("documentdb");
var client = new documentdb_1.DocumentClient(this.options.host, { masterKey: this.options.masterKey });
I think it's easier if you just set the proxy as an ENV variable once, so it also serves to specify the proxy for libraries like request.js that are needed for other components of a chatbot like LUIS or QnA Maker.
I'm against this since it could mess with other clients that might not know that environment is set. This should be a requested change to bot-builder to support proxy for their backend.
I've been working with this library for connecting to a cosmos db from an azure chatbot and had trouble connecting to that DB behind a corporate proxy.
With this fix, the proxy can be configured previously with an ENV variable like these: