mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-01-06 22:40:26 -05:00
fix: warnings after rebase
This commit is contained in:
parent
f9dea8a52c
commit
29294bdabb
2 changed files with 2 additions and 2 deletions
|
@ -12,6 +12,7 @@ const securityIframe = Middleware.securityIframe;
|
|||
const route = express.Router(); // eslint-disable-line
|
||||
const async = require('async');
|
||||
const HTTPError = require('http-errors');
|
||||
const Utils = require('../../lib/utils');
|
||||
|
||||
/*
|
||||
This file include all verdaccio only API(Web UI), for npm API please see ../endpoint/
|
||||
|
|
|
@ -38,8 +38,7 @@ module.exports = function(config, auth, storage) {
|
|||
});
|
||||
|
||||
router.get('/', function(req, res) {
|
||||
const proto = req.get('X-Forwarded-Proto') || req.protocol;
|
||||
const base = Utils.combineBaseUrl(proto, req.get('host'), config.url_prefix);
|
||||
const base = Utils.combineBaseUrl(Utils.getWebProtocol(req), req.get('host'), config.url_prefix);
|
||||
res.setHeader('Content-Type', 'text/html');
|
||||
res.send(template.replace(/ToReplaceByVerdaccio/g, base).replace(/(main.*\.js|style.*\.css)/g, `${base}/-/static/$1`));
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue