From 03a5803786e9e7f38ecb5ff30d3cae115374695e Mon Sep 17 00:00:00 2001 From: Mystikfluu Date: Fri, 17 Jun 2022 20:00:50 +0200 Subject: [PATCH] add ssl privatekey/certificate to config --- server.js | 4 ++-- server_config.json | 4 ++++ views/otheruser.html | 10 +++++----- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/server.js b/server.js index 1340848..9bbfbb0 100644 --- a/server.js +++ b/server.js @@ -901,8 +901,8 @@ app.use(router) const httpServer = http.createServer(app); httpServer.listen(25567); -const privateKey = fs.readFileSync("C:/Certbot/live/ws.zerotwohub.tk/privkey.pem").toString() -const certificate = fs.readFileSync("C:/Certbot/live/ws.zerotwohub.tk/cert.pem").toString() +const privateKey = fs.readFileSync(config["ssl"]["privateKey"]).toString() +const certificate = fs.readFileSync(config["ssl"]["certificate"]).toString() const credentials = {key: privateKey, cert: certificate}; diff --git a/server_config.json b/server_config.json index a6deaa3..ddf7c8c 100644 --- a/server_config.json +++ b/server_config.json @@ -24,5 +24,9 @@ "logs": { "level": 5 }, + "ssl": { + "privateKey": "/etc/letsencrypt/live/ipost.tk/privkey.pem", + "certificate" : "/etc/letsencrypt/live/ipost.tk/cert.pem" + }, "disallow_proxies_by_headers": true } diff --git a/views/otheruser.html b/views/otheruser.html index efc57f6..24fd9e6 100644 --- a/views/otheruser.html +++ b/views/otheruser.html @@ -15,11 +15,11 @@

USER

-
-
-

Bio:

- -
+
+
+

Bio:

+ +