KEYCLOAK-526 Fix iframe origin when auth server url is relative
This commit is contained in:
parent
9228f0c076
commit
2866f6fc23
1 changed files with 5 additions and 1 deletions
|
@ -531,7 +531,11 @@ var Keycloak = function (config) {
|
|||
|
||||
iframe.onload = function() {
|
||||
var realmUrl = getRealmUrl();
|
||||
loginIframe.iframeOrigin = realmUrl.substring(0, realmUrl.indexOf('/', 8));
|
||||
if (realmUrl.charAt(0) === '/') {
|
||||
loginIframe.iframeOrigin = window.location.origin;
|
||||
} else {
|
||||
loginIframe.iframeOrigin = realmUrl.substring(0, realmUrl.indexOf('/', 8));
|
||||
}
|
||||
loginIframe.iframe = iframe;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue