KEYCLOAK-1019 Fix to keycloak.js if auth-server-url ends with '/'

This commit is contained in:
Stian Thorgersen 2015-01-30 10:02:27 +01:00
parent 0e344e6461
commit e2998a09b6

View file

@ -310,7 +310,11 @@
} }
function getRealmUrl() { 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() { function getOrigin() {