0
Fork 0
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:
Juan Picado @jotadeveloper 2017-07-18 21:25:01 +02:00
parent f9dea8a52c
commit 29294bdabb
No known key found for this signature in database
GPG key ID: 18AC54485952D158
2 changed files with 2 additions and 2 deletions

View file

@ -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/

View file

@ -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`));
});