0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-24 23:55:46 -05:00

chore: fix router issue

This commit is contained in:
Juan Picado @jotadeveloper 2019-02-19 07:04:39 +01:00
parent 7db5b93806
commit 28a50bfe08
No known key found for this signature in database
GPG key ID: 18AC54485952D158

View file

@ -12,7 +12,6 @@ import express from 'express';
import { combineBaseUrl, getWebProtocol } from '../../lib/utils';
import Search from '../../lib/search';
import { HEADERS, HTTP_STATUS, WEB_TITLE } from '../../lib/constants';
import { spliceURL } from '../../utils/string';
const { securityIframe } = require('../middleware');
/* eslint new-cap:off */
@ -66,16 +65,10 @@ module.exports = function(config, auth, storage) {
res.send(webPage);
}
router.get('/-/web/:pkg', function(req, res) {
router.get('/-/web/:section/*', function(req, res) {
renderHTML(req, res);
});
router.get('/-/verdaccio/logo', function(req, res) {
const installPath = _.get(config, 'url_prefix', '');
res.send(_.get(config, 'web.logo') || spliceURL(installPath, '/-/static/logo.png'));
});
router.get('/', function(req, res) {
renderHTML(req, res);
});