mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-21 11:49:59 +00:00
⚡ Make sure that it looks for SSL certs only if defined
This commit is contained in:
@@ -1268,10 +1268,10 @@ export async function start(): Promise<void> {
|
||||
|
||||
let server;
|
||||
|
||||
if(app.protocol === 'https'){
|
||||
if (app.protocol === 'https' && app.sslKey && app.sslCert){
|
||||
const https = require('https');
|
||||
const privateKey = readFileSync(app.sslKey,'utf8');
|
||||
const cert = readFileSync(app.sslCert,'utf8');
|
||||
const privateKey = readFileSync(app.sslKey, 'utf8');
|
||||
const cert = readFileSync(app.sslCert, 'utf8');
|
||||
const credentials = { key: privateKey,cert };
|
||||
server = https.createServer(credentials,app.app);
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user