Просмотр исходного кода

use HttpSchemes constants

tags/v0.5.0
Jonathan Cobb 4 лет назад
Родитель
Сommit
dcf64600d9
2 измененных файлов: 4 добавлений и 2 удалений
  1. +2
    -1
      bubble-server/src/main/java/bubble/client/BubbleNodeClient.java
  2. +2
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleNetwork.java

+ 2
- 1
bubble-server/src/main/java/bubble/client/BubbleNodeClient.java Просмотреть файл

@@ -24,6 +24,7 @@ import static bubble.server.BubbleServer.getRestoreKey;
import static bubble.server.BubbleServer.isRestoreMode;
import static org.cobbzilla.util.daemon.ZillaRuntime.die;
import static org.cobbzilla.util.daemon.ZillaRuntime.notSupported;
import static org.cobbzilla.util.http.HttpSchemes.SCHEME_HTTPS;
import static org.cobbzilla.util.json.JsonUtil.COMPACT_MAPPER;
import static org.cobbzilla.util.json.JsonUtil.json;

@@ -67,7 +68,7 @@ public class BubbleNodeClient extends BubbleApiClient {

private static String baseUri(BubbleNode node, BubbleConfiguration configuration) {
final HttpConfiguration http = configuration.getHttp();
return "https://" + node.getFqdn() + ":" + node.getSslPort() + http.getBaseUri();
return SCHEME_HTTPS + node.getFqdn() + ":" + node.getSslPort() + http.getBaseUri();
}

@Override protected <T> void setRequestEntity(HttpEntityEnclosingRequest entityRequest, T data, ContentType contentType) {


+ 2
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleNetwork.java Просмотреть файл

@@ -36,6 +36,7 @@ import static bubble.model.cloud.BubbleNetworkState.created;
import static bubble.server.BubbleConfiguration.getDEFAULT_LOCALE;
import static org.cobbzilla.util.daemon.ZillaRuntime.die;
import static org.cobbzilla.util.daemon.ZillaRuntime.empty;
import static org.cobbzilla.util.http.HttpSchemes.SCHEME_HTTPS;
import static org.cobbzilla.util.reflect.ReflectionUtil.copy;
import static org.cobbzilla.util.string.ValidationRegexes.HOST_PART_PATTERN;
import static org.cobbzilla.util.string.ValidationRegexes.validateRegexMatches;
@@ -103,7 +104,7 @@ public class BubbleNetwork extends IdentifiableBase implements HasNetwork, HasBu
@Getter @Setter private Integer sslPort;

@Transient @JsonIgnore public String getPublicUri() {
return "https://" + getNetworkDomain() + (getSslPort() == 443 ? "" : ":"+getSslPort());
return SCHEME_HTTPS + getNetworkDomain() + (getSslPort() == 443 ? "" : ":"+getSslPort());
}

public String getPublicUri(BubbleConfiguration configuration) {


Загрузка…
Отмена
Сохранить