From 892025e5b2f7c3d861060f04880dd2fbca23aed6 Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Sun, 9 Jul 2023 13:09:28 -0300 Subject: [PATCH] fix(all): Minor changes in PROD. --- src/app.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app.ts b/src/app.ts index 01fb6dc2..947cd52a 100644 --- a/src/app.ts +++ b/src/app.ts @@ -281,15 +281,14 @@ export class GBServer { // Setups unsecure http redirect. const httpServer = express(); - httpServer.use(function (request, response, next) { - if (process.env.NODE_ENV != 'development' && !request.secure) { + httpServer.use( (request, response, next) => { + if (request.headers.host != 'localhost' && !request.secure) { return response.redirect("https://" + request.headers.host + request.url); } next(); }); - if (process.env.CERTIFICATE_PFX) { const options1 = { passphrase: process.env.CERTIFICATE_PASSPHRASE,