Skip to content

Commit 337e0c3

Browse files
authored
Merge pull request #15 from tynes/configurable-cert
bouncer: configurable cert option
2 parents 8f4b6d7 + 5598dc7 commit 337e0c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bouncer.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ const BOUNCER_SHACK = config.bouncerShack?config.bouncerShack:10;
2828
const SERVER_WEBIRC = config.webircPassword?config.webircPassword:'';
2929
const SERVER_WEBIRCHASHIP = config.webircHashIp?true:false;
3030
const SERVER_WEBIRCPROXY = config.webircProxy?true:false;
31+
const SERVER_TLS_KEY = config.tlsKey?config.tlsKey:'privkey.pem';
32+
const SERVER_TLS_CERT = config.tlsCert?config.tlsCert:'fullchain.pem';
3133
const SERVER_PORT = BOUNCER_MODE=='gateway'?(config.serverPort?config.serverPort:0):0;
3234
const INGRESSWEBIRC = config.ingresswebircPassword?config.ingresswebircPassword:'';
3335
const SERVER = BOUNCER_MODE=='gateway'?(config.server?config.server:''):'';
@@ -60,8 +62,8 @@ let doServer;
6062
let tlsOptions;
6163
if(BOUNCER_PORT.toString().substr(0,1)=='+') {
6264
tlsOptions = {
63-
key: fs.readFileSync("privkey.pem"),
64-
cert: fs.readFileSync("fullchain.pem")
65+
key: fs.readFileSync(SERVER_TLS_KEY),
66+
cert: fs.readFileSync(SERVER_TLS_CERT)
6567
};
6668
BOUNCER_PORT=BOUNCER_PORT.substr(1);
6769
doServer = tls.createServer;

0 commit comments

Comments
 (0)