Skip to content
Snippets Groups Projects

rename insecure to --no-tls and add to Makefile

Merged Timm Fitschen requested to merge f-run-insecure into dev
3 unresolved threads
3 files
+ 15
13
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -117,7 +117,7 @@ public class CaosDBServer extends Application {
private static ArrayList<Runnable> postShutdownHooks = new ArrayList<Runnable>();
private static ArrayList<Runnable> preShutdownHooks = new ArrayList<Runnable>();
private static boolean START_BACKEND = true;
private static boolean INSECURE = false;
private static boolean NO_TLS = false;
Please register or sign in to reply
public static final String REQUEST_TIME_LOGGER = "REQUEST_TIME_LOGGER";
public static final String REQUEST_ERRORS_LOGGER = "REQUEST_ERRORS_LOGGER";
private static Scheduler SCHEDULER;
@@ -160,24 +160,23 @@ public class CaosDBServer extends Application {
* Parse the command line arguments.
*
* <ul>
* <li>"nobackend": flag to run caosdb without any backend (for testing purposes)
* <li>"insecure": flag to start only a http server (no https server)
* <li>"--no-backend": flag to run caosdb without any backend (for testing purposes)
* <li>"--no-tls": flag to start only a http server (no https server)
* </ul>
*
* <p>Both flags are only available in the debug mode which is controlled by the `caosdb.debug`
* JVM Property.
* <p>The --no-backend flag is only available in the debug mode which is controlled by the
* `caosdb.debug` JVM Property.
*
* @param args
*/
private static void parseArguments(final String[] args) {
for (final String s : args) {
if (s.equals("nobackend")) {
if (s.equals("--no-backend")) {
START_BACKEND = false;
} else if (s.equals("insecure")) {
INSECURE = true;
} else if (s.equals("--no-tls")) {
NO_TLS = true;
}
}
INSECURE = INSECURE && isDebugMode(); // only allow insecure in debug mode
Please register or sign in to reply
START_BACKEND = START_BACKEND || !isDebugMode(); // always start backend if not in debug mode
}
@@ -347,7 +346,7 @@ public class CaosDBServer extends Application {
final int maxTotalConnections =
Integer.parseInt(getServerProperty(ServerProperties.KEY_MAX_CONNECTIONS));
if (INSECURE) {
if (NO_TLS) {
runHTTPServer(port_http, initialConnections, maxTotalConnections);
} else {
runHTTPSServer(
Loading