root

update app.js

Showing 1 changed file with 3 additions and 2 deletions
...@@ -51,8 +51,9 @@ app.post('/hook', function (req, res) { ...@@ -51,8 +51,9 @@ app.post('/hook', function (req, res) {
51 }); 51 });
52 try { 52 try {
53 const option = { 53 const option = {
54 - key: fs.readFileSync('./rootca.key', 'utf8'), 54 + ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
55 - cert: fs.readFileSync('./rootca.crt' ,'utf8'), 55 + key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
56 + cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
56 }; 57 };
57 58
58 HTTPS.createServer(option, app).listen(sslport, () => { 59 HTTPS.createServer(option, app).listen(sslport, () => {
......