Add HTTPS support by giving an SSL Cert and Key

This commit is contained in:
KH Wong
2020-03-28 01:19:30 +08:00
parent 6c86269aaf
commit 2870818211
2 changed files with 39 additions and 4 deletions

View File

@@ -175,6 +175,18 @@ const config = convict({
env: 'N8N_PROTOCOL',
doc: 'HTTP Protocol via which n8n can be reached'
},
ssl_key: {
format: String,
default: 'server.key',
env: 'N8N_SSL_KEY',
doc: 'SSL Key for HTTPS Protocol'
},
ssl_cert: {
format: String,
default: 'server.pem',
env: 'N8N_SSL_CERT',
doc: 'SSL Cert for HTTPS Protocol'
},
security: {
basicAuth: {
@@ -276,10 +288,10 @@ const config = convict({
// Overwrite default configuration with settings which got defined in
// optional configuration files
if (process.env.N8N_CONFIG_FILES !== undefined) {
const configFiles = process.env.N8N_CONFIG_FILES.split(',');
console.log(`\nLoading configuration overwrites from:\n - ${configFiles.join('\n - ')}\n`);
const configFiles = process.env.N8N_CONFIG_FILES.split(',');
console.log(`\nLoading configuration overwrites from:\n - ${configFiles.join('\n - ')}\n`);
config.loadFile(configFiles);
config.loadFile(configFiles);
}
config.validate({