Merge pull request #940 from stianst/master
KEYCLOAK-1019 Fix to keycloak.js if auth-server-url ends with '/'
This commit is contained in:
commit
8c2ffeb601
1 changed files with 5 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue