AshishKapoor commented on pull request #10408:
URL: https://github.com/apache/druid/pull/10408#issuecomment-696402795


   *@vogievetsky* Fixed the issue and created an initialize method. Please let
   me know how we can make it better.
   
   On Mon, Sep 21, 2020 at 12:59 AM Vadim Ogievetsky <[email protected]>
   wrote:
   
   > *@vogievetsky* requested changes on this pull request.
   >
   > This PR currently breaks the existing configuration route.
   > Try adding "customHeaders": { 'x-test-header': 'this-is-a-test' } to the
   > console-config.js file and see that the custom headers will not be applied.
   > This is because while you are creating a custom instance you are still
   > setting Api.defaults which will not be read now.
   >
   > I suggest you make a method called Api.initialize that will take the
   > configs and create the instance. It must be called before any API requests
   > can go through (in entry.ts).
   > ------------------------------
   >
   > In web-console/src/entry.ts
   > <https://github.com/apache/druid/pull/10408#discussion_r491724970>:
   >
   > > @@ -70,14 +70,14 @@ if (typeof consoleConfig.title === 'string') {
   >  }
   >
   >  if (consoleConfig.baseURL) {
   > -  axios.defaults.baseURL = consoleConfig.baseURL;
   > +  Api.defaults.baseURL = consoleConfig.baseURL;
   >
   > These will now be ignored
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/druid/pull/10408#pullrequestreview-492216965>,
   > or unsubscribe
   > 
<https://github.com/notifications/unsubscribe-auth/ABHWJIYP624GA2XUOSCN2TTSGZJYVANCNFSM4RSAOROQ>
   > .
   >
   
   
   -- 
   Sincerely
   Ashish Kapoor
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to