mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-27 22:59:51 -05:00
enable verdaccio behind a https nginx proxy (#222)
* enable verdaccio to run with http protcol behind a https reverse proxy * add semicolon
This commit is contained in:
parent
9db2372c05
commit
ef360d6927
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,8 @@ module.exports = function(config, auth, storage) {
|
|||
template = Handlebars.compile(fs.readFileSync(require.resolve('./GUI/index.hbs'), 'utf8'));
|
||||
}
|
||||
app.get('/', function(req, res, next) {
|
||||
let base = Utils.combineBaseUrl(req.protocol, req.get('host'), config.url_prefix);
|
||||
let proto = req.get('X-Forwarded-Proto') || req.protocol;
|
||||
let base = Utils.combineBaseUrl(proto, req.get('host'), config.url_prefix);
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
|
||||
storage.get_local(function(err, packages) {
|
||||
|
|
Loading…
Add table
Reference in a new issue