Skip to content

Commit

Permalink
Merge pull request #1583 from SynBioHub/fixSecureSetup
Browse files Browse the repository at this point in the history
Check if https used for setup
  • Loading branch information
cjmyers authored Dec 3, 2024
2 parents 6d69488 + 7d0511e commit cbb710c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ function App () {

// use cors
app.use(cors())
app.set('trust proxy', true)

const uploadToMemory = multer({
storage: multer.memoryStorage({})
Expand Down
4 changes: 2 additions & 2 deletions lib/views/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ module.exports = function (req, res) {
const settings = {
instanceName: 'My SynBioHub',
frontendURL: '',
instanceUrl: req.secure ? req.protocol + 's' : req.protocol + '://' + req.get('Host') + '/',
uriPrefix: req.secure ? req.protocol + 's' : 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: '',
Expand Down

0 comments on commit cbb710c

Please sign in to comment.