Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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 @@ -96,15 +96,9 @@ public void close() {
@NoCache
@Path("{any:.*}")
public Response getMainPage() throws IOException, FreeMarkerException {
// Get the URI info of the server and admin console.
final var serverUriInfo = session.getContext().getUri(UrlType.FRONTEND);
final var adminUriInfo = session.getContext().getUri(UrlType.ADMIN);

// Get the base URLs of the server and admin console.
final var serverBaseUri = serverUriInfo.getBaseUri();
final var adminBaseUri = adminUriInfo.getBaseUri();

// Strip any trailing slashes from the URLs.
// Strip any trailing slashes from the URL.
final var serverBaseUrl = serverBaseUri.toString().replaceFirst("/+$", "");

final var map = new HashMap<String, Object>();
Expand All @@ -124,7 +118,7 @@ public Response getMainPage() throws IOException, FreeMarkerException {
map.put("realm", realm);
map.put("clientId", Constants.ACCOUNT_CONSOLE_CLIENT_ID);
map.put("resourceUrl", Urls.themeRoot(serverBaseUri).getPath() + "/" + Constants.ACCOUNT_MANAGEMENT_CLIENT_ID + "/" + theme.getName());
map.put("resourceCommonUrl", Urls.themeRoot(adminBaseUri).getPath() + "/common/keycloak");
map.put("resourceCommonUrl", Urls.themeRoot(serverBaseUri).getPath() + "/common/keycloak");
map.put("resourceVersion", Version.RESOURCES_VERSION);

String[] referrer = getReferrer();
Expand Down