mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-03-25 02:32:52 -05:00
fix: remove some unneeded checks (#1182)
This commit is contained in:
parent
064f7cfa5d
commit
ab56d750ca
2 changed files with 2 additions and 2 deletions
|
@ -411,7 +411,7 @@ class Storage implements IStorageHandler {
|
|||
const self = this;
|
||||
const upLinks = [];
|
||||
|
||||
if (!packageInfo || packageInfo === null) {
|
||||
if (!packageInfo) {
|
||||
exists = false;
|
||||
packageInfo = generatePackageTemplate(name);
|
||||
}
|
||||
|
|
|
@ -540,7 +540,7 @@ class ProxyStorage implements IProxy {
|
|||
//
|
||||
if (this.proxy === false) {
|
||||
headers['X-Forwarded-For'] = (
|
||||
req && req.headers['x-forwarded-for']
|
||||
req.headers['x-forwarded-for']
|
||||
? req.headers['x-forwarded-for'] + ', '
|
||||
: ''
|
||||
) + req.connection.remoteAddress;
|
||||
|
|
Loading…
Add table
Reference in a new issue