epugh commented on code in PR #4659:
URL: https://github.com/apache/solr/pull/4659#discussion_r3848043152


##########
solr/webapp/web/js/angular/app.js:
##########
@@ -478,6 +478,15 @@ solrAdminApp.config([
   $httpProvider.interceptors.push("httpInterceptor");
   // Force BasicAuth plugin to serve us a 'Authorization: xBasic xxxx' header 
so browser will not pop up login dialogue
   $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
+  // The V2 solrApi client (superagent-based) never goes through 
$httpProvider, so it needs its own
+  // copy of both headers: X-Requested-With for the same popup-suppression 
trick, and Authorization
+  // because -- unlike $http, which re-reads sessionStorage per request in 
httpInterceptor.started
+  // below -- solrApi only gets Authorization set in-memory 
(AuthenticationService.SetCredentials/
+  // ClearCredentials, login.js), which a page reload wipes; re-seed it here 
on every app bootstrap.

Review Comment:
   maybe...   But in a week or so (maybe!) we'll be on ApiClient for 
everything....



-- 
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.

To unsubscribe, e-mail: [email protected]

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