From 671c171591800814ca4e947ecd9e85d9e9397d11 Mon Sep 17 00:00:00 2001 From: Chris Myers Date: Thu, 21 Nov 2024 17:22:05 -0700 Subject: [PATCH] Guess https if secure --- lib/views/setup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/views/setup.js b/lib/views/setup.js index de701003..6cabec79 100644 --- a/lib/views/setup.js +++ b/lib/views/setup.js @@ -58,8 +58,8 @@ module.exports = function (req, res) { const settings = { instanceName: 'My SynBioHub', frontendURL: '', - instanceUrl: req.protocol + '://' + req.get('Host') + '/', - uriPrefix: req.protocol + '://' + req.get('Host') + '/', + instanceUrl: req.secure ? req.protocol + 's' : req.protocol + '://' + req.get('Host') + '/', + uriPrefix: req.secure ? req.protocol + 's' : req.protocol + '://' + req.get('Host') + '/', altHome: '', userName: '', affiliation: '',