diff --git a/app/rts/src/server.ts b/app/rts/src/server.ts index d87cdd8168..bc7423d1c1 100644 --- a/app/rts/src/server.ts +++ b/app/rts/src/server.ts @@ -35,7 +35,7 @@ if (API_BASE_URL == null || API_BASE_URL === "") { process.exit(1); } -const PORT = process.env.PORT || 8091; +const APPSMITH_RTS_PORT = process.env.APPSMITH_RTS_PORT || 8091; //Disable x-powered-by header to prevent information disclosure const app = express(); @@ -62,8 +62,8 @@ app.use(`${RTS_BASE_API_PATH}`, health_check_routes); server.headersTimeout = 61000; server.keepAliveTimeout = 60000; // Run the server -server.listen(PORT, () => { - log.info(`RTS version ${buildVersion} running at http://localhost:${PORT}`); +server.listen(APPSMITH_RTS_PORT, () => { + log.info(`RTS version ${buildVersion} running at http://localhost:${APPSMITH_RTS_PORT}`); }); export default server; diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonConfig.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonConfig.java index 5994d499a0..a9407b3c64 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonConfig.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/CommonConfig.java @@ -64,7 +64,8 @@ public class CommonConfig { @Value("${disable.telemetry:true}") private boolean isTelemetryDisabled; - private String rtsBaseDomain = "http://127.0.0.1:8091"; + @Value("${appsmith.rts.port:8091}") + private String rtsPort; private List allowedDomains; @@ -128,5 +129,8 @@ public class CommonConfig { // If `true`, then disable signup. If anything else, including empty string, then signups will be enabled. isSignupDisabled = "true".equalsIgnoreCase(value); } - + + public String getRtsBaseUrl() { + return "http://127.0.0.1:" + rtsPort; + } } diff --git a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/InstanceConfig.java b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/InstanceConfig.java index 63a0705d4b..5258276d62 100644 --- a/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/InstanceConfig.java +++ b/app/server/appsmith-server/src/main/java/com/appsmith/server/configurations/InstanceConfig.java @@ -149,7 +149,7 @@ public class InstanceConfig implements ApplicationListener