schema: config: make floodServerProxy and ssl properties optional

This commit is contained in:
Jesse Chan
2020-11-14 15:31:59 +08:00
parent ed98e210f4
commit ca9890a69c
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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: '<rundir>/key.pem']