From 61d77e6a0920a7607e6396d6a0acf5813c84ba52 Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 20 Jan 2023 18:08:28 +0000 Subject: [PATCH] add secure-poketube-instance --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index 28e66b22..74544eef 100644 --- a/server.js +++ b/server.js @@ -114,6 +114,8 @@ this is our config file,you can change stuff here app.use(function (request, response, next) { if (config.enablealwayshttps == true) { if (process.env.NODE_ENV != "development" && !request.secure) { + response.header("secure-poketube-instance", "1"); + return response.redirect( "https://" + request.headers.host + request.url );