Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Commit

Permalink
Pass HTTPS certificate locations with Cirrus configuration file (#149)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcin Biegun <marcin@spacecatlabs.com>
  • Loading branch information
marcinbiegun and SpaceCatLabs committed Mar 20, 2023
1 parent acd4cd2 commit d63d942
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions SignallingWebServer/cirrus.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const defaultConfig = {
UseFrontend: false,
UseMatchmaker: false,
UseHTTPS: false,
HTTPSCertFile: './certificates/client-cert.pem',
HTTPSKeyFile: './certificates/client-key.pem',
UseAuthentication: false,
LogToFile: true,
LogVerbose: true,
Expand Down Expand Up @@ -51,8 +53,8 @@ var http = require('http').Server(app);
if (config.UseHTTPS) {
//HTTPS certificate details
const options = {
key: fs.readFileSync(path.join(__dirname, './certificates/client-key.pem')),
cert: fs.readFileSync(path.join(__dirname, './certificates/client-cert.pem'))
key: fs.readFileSync(path.join(__dirname, config.HTTPSKeyFile)),
cert: fs.readFileSync(path.join(__dirname, config.HTTPSCertFile))
};

var https = require('https').Server(options, app);
Expand Down

0 comments on commit d63d942

Please sign in to comment.