diff --git a/server/bin/web-server.ts b/server/bin/web-server.ts index 90d6eed0..3c61dbd4 100755 --- a/server/bin/web-server.ts +++ b/server/bin/web-server.ts @@ -31,7 +31,7 @@ const normalizePort = (val: string | number): string | number => { const startWebServer = () => { const port = normalizePort(config.floodServerPort); const host = config.floodServerHost; - const useSSL = config.ssl; + const useSSL = config.ssl ?? false; app.set('port', port); app.set('host', host); diff --git a/shared/schema/Config.ts b/shared/schema/Config.ts index 677c123e..2ed86f4c 100644 --- a/shared/schema/Config.ts +++ b/shared/schema/Config.ts @@ -76,7 +76,7 @@ export const configSchema = object({ // CLI argument: --proxy // Used for development only. Not used in production. // See the "Local Development" section of README.md for detail. - floodServerProxy: string().url(), + floodServerProxy: string().url().optional(), // CLI argument: --maxhistorystates // Flood keeps a history of torrent download and upload speeds. @@ -107,7 +107,7 @@ export const configSchema = object({ // CLI argument: --ssl // Configuration for SSL, if using SSL with the Flood service directly. [default: false] - ssl: boolean(), + ssl: boolean().optional(), // CLI argument: --sslkey // Path to the SSL private key. [default: '/key.pem']