Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1215,17 +1215,25 @@ public static String resolveOriginUrlFromPlaceholders(String absoluteUrl, String
}

if (StringUtils.isEmpty(basePath)) {
return resolveOriginUrlFromPlaceholders(absoluteUrl);
basePath = getAbsolutePublicUrlWithoutPath();
}
absoluteUrl = StringUtils.replace(absoluteUrl, BASE_URL_PLACEHOLDER, basePath);

if (ApplicationConstants.MY_ACCOUNT_APPLICATION_NAME.equals(appName)) {
String consoleBasePath = IdentityUtil.getProperty(CONSOLE_ACCESS_ORIGIN);
if (StringUtils.isEmpty(consoleBasePath)) {
consoleBasePath = getAbsolutePublicUrlWithoutPath();
}
absoluteUrl = StringUtils.replace(absoluteUrl, BASE_URL_CUSTOM_PLACEHOLDER, consoleBasePath);
}
return absoluteUrl;
}

private static String getAbsolutePublicUrlWithoutPath() throws URLBuilderException {

return ServiceURLBuilder.create().build().getAbsolutePublicUrlWithoutPath();
}

/**
* Check whether the application is Console or My Account by app name.
*
Expand Down
Loading