mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-1061 SAML configuration and servlet
This commit is contained in:
@@ -74,6 +74,7 @@ public class CBApplication extends BaseApplicationImpl {
|
||||
return (CBApplication) BaseApplicationImpl.getInstance();
|
||||
}
|
||||
|
||||
private String serverURL;
|
||||
private int serverPort = CBConstants.DEFAULT_SERVER_PORT;
|
||||
private String serverName = null;
|
||||
private String contentRoot = CBConstants.DEFAULT_CONTENT_ROOT;
|
||||
@@ -103,6 +104,10 @@ public class CBApplication extends BaseApplicationImpl {
|
||||
public CBApplication() {
|
||||
}
|
||||
|
||||
public String getServerURL() {
|
||||
return serverURL;
|
||||
}
|
||||
|
||||
public int getServerPort() {
|
||||
return serverPort;
|
||||
}
|
||||
@@ -403,6 +408,12 @@ public class CBApplication extends BaseApplicationImpl {
|
||||
|
||||
Map<String, Object> serverConfig = JSONUtils.getObject(configProps, "server");
|
||||
serverPort = JSONUtils.getInteger(serverConfig, CBConstants.PARAM_SERVER_PORT, serverPort);
|
||||
if (serverConfig.containsKey(CBConstants.PARAM_SERVER_URL)) {
|
||||
serverURL = JSONUtils.getString(serverConfig, CBConstants.PARAM_SERVER_URL, serverURL);
|
||||
} else if (serverURL == null) {
|
||||
serverURL = "http://" + InetAddress.getLocalHost().getHostName() + ":" + serverPort;
|
||||
}
|
||||
|
||||
serverName = JSONUtils.getString(serverConfig, CBConstants.PARAM_SERVER_NAME, serverName);
|
||||
contentRoot = getRelativePath(
|
||||
JSONUtils.getString(serverConfig, CBConstants.PARAM_CONTENT_ROOT, contentRoot), homeFolder);
|
||||
|
||||
@@ -38,6 +38,7 @@ public class CBConstants {
|
||||
public static final String PARAM_SERVER_PORT = "serverPort";
|
||||
public static final String PARAM_SERVER_NAME = "serverName";
|
||||
public static final String PARAM_CONTENT_ROOT = "contentRoot";
|
||||
public static final String PARAM_SERVER_URL = "serverURL";
|
||||
public static final String PARAM_ROOT_URI = "rootURI";
|
||||
public static final String PARAM_SERVICES_URI = "serviceURI";
|
||||
public static final String PARAM_DRIVERS_LOCATION = "driversLocation";
|
||||
@@ -69,6 +70,7 @@ public class CBConstants {
|
||||
|
||||
public static final String VAR_CB_LOCAL_HOST_ADDR = "CB_LOCAL_HOST_ADDR";
|
||||
|
||||
public static final String DEFAULT_SERVER_ADDR = "localhost";
|
||||
|
||||
public static final String VAR_HOST_DOCKER_INTERNAL = "host.docker.internal";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user