KEYCLOAK-8162 review comment adopted
This commit is contained in:
parent
318b290f55
commit
9e366f0453
1 changed files with 1 additions and 28 deletions
|
@ -94,7 +94,7 @@ public class UrlBean {
|
|||
}
|
||||
|
||||
public String getResourcesUrl() {
|
||||
return getHostPortScheme(baseURI)+ getResourcesPath();
|
||||
return Urls.themeRoot(baseURI).toString() + "/" + theme.getType().toString().toLowerCase() +"/" + theme.getName();
|
||||
}
|
||||
|
||||
public String getOauthAction() {
|
||||
|
@ -109,31 +109,4 @@ public class UrlBean {
|
|||
URI uri = Urls.themeRoot(baseURI);
|
||||
return uri.getPath() + "/" + theme.getType().toString().toLowerCase() +"/" + theme.getName();
|
||||
}
|
||||
|
||||
private String getHostPortScheme(URI baseUri) {
|
||||
|
||||
StringBuilder hostPostScheme = new StringBuilder("");
|
||||
String scheme = baseUri.getScheme();
|
||||
int port = baseUri.getPort();
|
||||
String host = baseUri.getHost();
|
||||
|
||||
if (scheme == null) {
|
||||
scheme = "http";
|
||||
}
|
||||
hostPostScheme
|
||||
.append(scheme)
|
||||
.append("://");
|
||||
|
||||
if (host == null) {
|
||||
host = "localhost";
|
||||
}
|
||||
hostPostScheme.append(host);
|
||||
|
||||
if (port != -1) {
|
||||
hostPostScheme.append(":")
|
||||
.append(port);
|
||||
}
|
||||
|
||||
return hostPostScheme.toString();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue