Merge pull request #940 from stianst/master

KEYCLOAK-1019 Fix to keycloak.js if auth-server-url ends with '/'
This commit is contained in:
Stian Thorgersen 2015-01-30 13:57:20 +01:00
commit 8c2ffeb601

View file

@ -310,7 +310,11 @@
}
function getRealmUrl() {
return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);
if (kc.authServerUrl.charAt(kc.authServerUrl.length - 1) == '/') {
return kc.authServerUrl + 'realms/' + encodeURIComponent(kc.realm);
} else {
return kc.authServerUrl + '/realms/' + encodeURIComponent(kc.realm);
}
}
function getOrigin() {