You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2018/10/09 09:09:14 UTC

[10/27] lucene-solr:solr7896-login-page: Enable auth interceptor and hardcoded pw

Enable auth interceptor and hardcoded pw


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/d531b923
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/d531b923
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/d531b923

Branch: refs/heads/solr7896-login-page
Commit: d531b92358ceb6317bfe2ad041e53c9d1d04a6c6
Parents: 4457de3
Author: Jan Høydahl <ja...@apache.org>
Authored: Wed Aug 8 16:24:47 2018 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Wed Aug 8 16:24:47 2018 +0200

----------------------------------------------------------------------
 solr/webapp/web/js/angular/app.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/d531b923/solr/webapp/web/js/angular/app.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.js
index 9be1ee5..3f781cd 100644
--- a/solr/webapp/web/js/angular/app.js
+++ b/solr/webapp/web/js/angular/app.js
@@ -371,7 +371,7 @@ solrAdminApp.config([
 })
 .factory('authInterceptor', function($q, $rootScope, $timeout, $injector) {
   var started = function(config) {
-    var ah = "Basic c29scjpzb2xyUm9ja3M=";  // solr / solrRocks
+    var ah = "Basic c29scjpTb2xyUm9ja3M=";  // solr / SolrRocks
     config.headers['Authorization'] = ah;
     console.log("Added authorization header " + ah);
     return config || $q.when(config);
@@ -389,6 +389,8 @@ solrAdminApp.config([
     console.log("Failed with rejection " + JSON.stringify(rejection, undefined, 2));
     if (rejection.status === 401) {
       console.log("Status code is 401");
+    } else {
+      console.log("Rejection status is " + rejection.status)
     }
     $rootScope.$broadcast('loadingStatusInactive');
     return $q.reject(rejection);
@@ -398,7 +400,7 @@ solrAdminApp.config([
 })
 .config(function($httpProvider) {
   $httpProvider.interceptors.push("httpInterceptor");
-  //$httpProvider.interceptors.push("authInterceptor");
+  $httpProvider.interceptors.push("authInterceptor");
   // Tell the BasicAuth plugin that we are Admin UI so it can serve us a 'Authorization: xBasic xxxx' header
   // so that the browser will not intercept the login dialogue
   $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';