Skip to content

Commit

Permalink
ZCS-16382 : add log for server starting
Browse files Browse the repository at this point in the history
  • Loading branch information
umagmrit committed Dec 31, 2024
1 parent 8b77c1b commit c4ff8dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DocService/sources/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,10 @@ if (config.has('ssl')) {
const certificateKey = fs.readFileSync(config.get('ssl.cert')).toString();
//See detailed options format here: http://nodejs.org/api/tls.html#tls_tls_createserver_options_secureconnectionlistener
const options = {key: privateKey, cert: certificateKey};

operationContext.global.logger.warn('Express server is starting with SSL encryption. Ensure that the SSL key and certificate are correctly configured.');
server = https.createServer(options, app);
} else {
operationContext.global.logger.warn('Express server is starting without SSL. This may expose traffic to potential security risks. Consider enabling SSL for production environments.');
server = http.createServer(app);
}

Expand Down

0 comments on commit c4ff8dd

Please sign in to comment.