ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From me...@apache.org
Subject ranger git commit: RANGER-2079 : RANGER Admin UI login through knox proxy fails with 404
Date Fri, 11 May 2018 06:02:41 GMT
Repository: ranger
Updated Branches:
  refs/heads/master 5ab18c4dd -> cfb2cdade


RANGER-2079 : RANGER Admin UI login through knox proxy fails with 404

Change-Id: Iffe5d76e8b6a6fafce075259391f7d33425bd68d

Signed-off-by: Mehul Parikh <mehul@apache.org>


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

Branch: refs/heads/master
Commit: cfb2cdaded11c9843411936bf0802d8fd2d2e6e9
Parents: 5ab18c4
Author: Nikhil P <nikhil.purbhe@gmail.com>
Authored: Thu May 10 10:19:16 2018 +0530
Committer: Mehul Parikh <mehul@apache.org>
Committed: Fri May 11 11:32:16 2018 +0530

----------------------------------------------------------------------
 .../src/main/webapp/scripts/prelogin/XAPrelogin.js    | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/cfb2cdad/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
----------------------------------------------------------------------
diff --git a/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js b/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
index c8b0c49..b2e5515 100644
--- a/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
+++ b/security-admin/src/main/webapp/scripts/prelogin/XAPrelogin.js
@@ -57,21 +57,13 @@ function doLogin() {
 		}
 	}	
 	var baseUrl = getBaseUrl();
-	if (baseUrl.lastIndexOf('/') != (baseUrl.length - 1)) {
-		if (baseUrl) {
-			baseUrl = baseUrl + '/';
-		} else {
-			baseUrl = '/';
-		}
-	}
-	var url = baseUrl + 'login';
 
 	$.ajax({
 		data : {
 			username : $('#username').val(),
 			password : $('#password').val()
 		},
-		url : url,
+		url : baseUrl,
 		type : 'POST',
 		headers : {
 			"cache-control" : "no-cache"
@@ -104,9 +96,7 @@ function getBaseUrl(){
 	if(!window.location.origin){
 		window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port
? ':' + window.location.port: '');
 	}
-	return window.location.origin
-	+ window.location.pathname.substring(window.location.pathname
-			.indexOf('/', 2) + 1, 0);
+	return window.location.origin + window.location.pathname.substring(window.location.pathname.lastIndexOf('.'),0);
 }
 $(function() {
   	// register handlers


Mime
View raw message