diff --git a/wise-api/src/main/java/com/wisemapping/rest/AppController.java b/wise-api/src/main/java/com/wisemapping/rest/AppController.java index 87acdc8e..cb8278ee 100644 --- a/wise-api/src/main/java/com/wisemapping/rest/AppController.java +++ b/wise-api/src/main/java/com/wisemapping/rest/AppController.java @@ -54,6 +54,9 @@ public class AppController extends BaseController { @Value("${app.site.api-base-url:}") private String apiBaseUrl; + @Value("${app.site.ui-base-url:}") + private String uiBaseUrl; + @Value("${app.analytics.account:}") private String analyticsAccount; @@ -65,6 +68,7 @@ public class AppController extends BaseController { public RestAppConfig appConfig() { return new RestAppConfig.RestAppConfigBuilder() .setApiUrl(apiBaseUrl) + .setUiUrl(uiBaseUrl) .setCaptchaSiteKey(captchaSiteKey) .setGoogleOauth2Url(googleOauth2Url) .setAnalyticsAccount(analyticsAccount) diff --git a/wise-api/src/main/java/com/wisemapping/rest/model/RestAppConfig.java b/wise-api/src/main/java/com/wisemapping/rest/model/RestAppConfig.java index d4b66c92..7f50cbf0 100644 --- a/wise-api/src/main/java/com/wisemapping/rest/model/RestAppConfig.java +++ b/wise-api/src/main/java/com/wisemapping/rest/model/RestAppConfig.java @@ -33,6 +33,7 @@ import org.jetbrains.annotations.NotNull; @JsonInclude(JsonInclude.Include.NON_NULL) public class RestAppConfig { private String apiBaseUrl; + private String uiBaseUrl; private String googleOauth2Url; private boolean registrationEnabled; private boolean recaptcha2Enabled; @@ -101,8 +102,17 @@ public class RestAppConfig { this.jwtExpirationMin = jwtExpirationMin; } + public String getUiBaseUrl() { + return uiBaseUrl; + } + + public void setUiBaseUrl(String uiBaseUrl) { + this.uiBaseUrl = uiBaseUrl; + } + public static class RestAppConfigBuilder { private String apiBaseUrl; + private String uiBaseUrl; private String googleOauth2Url; private boolean registrationEnabled; private boolean isCatchaEnabled = false; @@ -117,8 +127,13 @@ public class RestAppConfig { return this; } - public RestAppConfigBuilder setApiUrl(@NotNull String apiBaseUrl) { - this.apiBaseUrl = apiBaseUrl; + public RestAppConfigBuilder setApiUrl(@NotNull String url) { + this.apiBaseUrl = url; + return this; + } + + public RestAppConfigBuilder setUiUrl(@NotNull String url) { + this.uiBaseUrl = url; return this; } @@ -152,6 +167,7 @@ public class RestAppConfig { result.googleOauth2Url = googleOauth2Url; result.recaptcha2SiteKey = captchaSiteKey; result.recaptcha2Enabled = isCatchaEnabled; + result.uiBaseUrl = uiBaseUrl; result.apiBaseUrl = apiBaseUrl; result.registrationEnabled = registrationEnabled; result.analyticsAccount = analyticsAccount;