Add ui base url.
parent
c6af830dfa
commit
3c11f4034f
|
@ -54,6 +54,9 @@ public class AppController extends BaseController {
|
||||||
@Value("${app.site.api-base-url:}")
|
@Value("${app.site.api-base-url:}")
|
||||||
private String apiBaseUrl;
|
private String apiBaseUrl;
|
||||||
|
|
||||||
|
@Value("${app.site.ui-base-url:}")
|
||||||
|
private String uiBaseUrl;
|
||||||
|
|
||||||
@Value("${app.analytics.account:}")
|
@Value("${app.analytics.account:}")
|
||||||
private String analyticsAccount;
|
private String analyticsAccount;
|
||||||
|
|
||||||
|
@ -65,6 +68,7 @@ public class AppController extends BaseController {
|
||||||
public RestAppConfig appConfig() {
|
public RestAppConfig appConfig() {
|
||||||
return new RestAppConfig.RestAppConfigBuilder()
|
return new RestAppConfig.RestAppConfigBuilder()
|
||||||
.setApiUrl(apiBaseUrl)
|
.setApiUrl(apiBaseUrl)
|
||||||
|
.setUiUrl(uiBaseUrl)
|
||||||
.setCaptchaSiteKey(captchaSiteKey)
|
.setCaptchaSiteKey(captchaSiteKey)
|
||||||
.setGoogleOauth2Url(googleOauth2Url)
|
.setGoogleOauth2Url(googleOauth2Url)
|
||||||
.setAnalyticsAccount(analyticsAccount)
|
.setAnalyticsAccount(analyticsAccount)
|
||||||
|
|
|
@ -33,6 +33,7 @@ import org.jetbrains.annotations.NotNull;
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||||
public class RestAppConfig {
|
public class RestAppConfig {
|
||||||
private String apiBaseUrl;
|
private String apiBaseUrl;
|
||||||
|
private String uiBaseUrl;
|
||||||
private String googleOauth2Url;
|
private String googleOauth2Url;
|
||||||
private boolean registrationEnabled;
|
private boolean registrationEnabled;
|
||||||
private boolean recaptcha2Enabled;
|
private boolean recaptcha2Enabled;
|
||||||
|
@ -101,8 +102,17 @@ public class RestAppConfig {
|
||||||
this.jwtExpirationMin = jwtExpirationMin;
|
this.jwtExpirationMin = jwtExpirationMin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getUiBaseUrl() {
|
||||||
|
return uiBaseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUiBaseUrl(String uiBaseUrl) {
|
||||||
|
this.uiBaseUrl = uiBaseUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public static class RestAppConfigBuilder {
|
public static class RestAppConfigBuilder {
|
||||||
private String apiBaseUrl;
|
private String apiBaseUrl;
|
||||||
|
private String uiBaseUrl;
|
||||||
private String googleOauth2Url;
|
private String googleOauth2Url;
|
||||||
private boolean registrationEnabled;
|
private boolean registrationEnabled;
|
||||||
private boolean isCatchaEnabled = false;
|
private boolean isCatchaEnabled = false;
|
||||||
|
@ -117,8 +127,13 @@ public class RestAppConfig {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RestAppConfigBuilder setApiUrl(@NotNull String apiBaseUrl) {
|
public RestAppConfigBuilder setApiUrl(@NotNull String url) {
|
||||||
this.apiBaseUrl = apiBaseUrl;
|
this.apiBaseUrl = url;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RestAppConfigBuilder setUiUrl(@NotNull String url) {
|
||||||
|
this.uiBaseUrl = url;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +167,7 @@ public class RestAppConfig {
|
||||||
result.googleOauth2Url = googleOauth2Url;
|
result.googleOauth2Url = googleOauth2Url;
|
||||||
result.recaptcha2SiteKey = captchaSiteKey;
|
result.recaptcha2SiteKey = captchaSiteKey;
|
||||||
result.recaptcha2Enabled = isCatchaEnabled;
|
result.recaptcha2Enabled = isCatchaEnabled;
|
||||||
|
result.uiBaseUrl = uiBaseUrl;
|
||||||
result.apiBaseUrl = apiBaseUrl;
|
result.apiBaseUrl = apiBaseUrl;
|
||||||
result.registrationEnabled = registrationEnabled;
|
result.registrationEnabled = registrationEnabled;
|
||||||
result.analyticsAccount = analyticsAccount;
|
result.analyticsAccount = analyticsAccount;
|
||||||
|
|
Loading…
Reference in New Issue