Skip to content

Commit

Permalink
Rename base path environment variable for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimminich committed Mar 27, 2020
1 parent 824496d commit e3e7a43
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions routes/profileImageFileUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ module.exports = function fileUpload () {
}).catch(error => {
next(error)
})
res.location((process.env.basePath || '') + '/profile')
res.redirect((process.env.basePath || '') + '/profile')
res.location((process.env.BASE_PATH || '') + '/profile')
res.redirect((process.env.BASE_PATH || '') + '/profile')
} else {
next(new Error('Blocked illegal activity by ' + req.connection.remoteAddress))
}
Expand Down
4 changes: 2 additions & 2 deletions routes/profileImageUrlUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports = function profileImageUrlUpload () {
next(new Error('Blocked illegal activity by ' + req.connection.remoteAddress))
}
}
res.location((process.env.basePath || '') + '/profile')
res.redirect((process.env.basePath || '') + '/profile')
res.location((process.env.BASE_PATH || '') + '/profile')
res.redirect((process.env.BASE_PATH || '') + '/profile')
}
}
4 changes: 2 additions & 2 deletions routes/updateUserProfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = function updateUserProfile () {
} else {
next(new Error('Blocked illegal activity by ' + req.connection.remoteAddress))
}
res.location((process.env.basePath || '') + '/profile')
res.redirect((process.env.basePath || '') + '/profile')
res.location((process.env.BASE_PATH || '') + '/profile')
res.redirect((process.env.BASE_PATH || '') + '/profile')
}
}
2 changes: 1 addition & 1 deletion test/e2eSubfolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const originalBase = require('../protractor.conf.js').config.baseUrl
const baseUrl = new url.URL(require('../protractor.subfolder.conf.js').config.baseUrl)
const basePath = baseUrl.pathname
const proxyPort = baseUrl.port
process.env.basePath = basePath
process.env.BASE_PATH = basePath

app.use('/subfolder', (req, res) => {
const proxyUrl = originalBase + req.url
Expand Down

0 comments on commit e3e7a43

Please sign in to comment.