KEYCLOAK-1019 Fix to keycloak.js if auth-server-url ends with '/'
This commit is contained in:
parent
0e344e6461
commit
e2998a09b6
1 changed files with 5 additions and 1 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue