Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appolo-agent

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appolo-agent - npm Package Compare versions

Comparing version 6.0.18 to 6.0.19

3

lib/util.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _ = require("lodash");
class Util {

@@ -18,3 +17,3 @@ static parseUrlFast(str) {

let ipAddress = req.headers['x-client-ip'] || req.headers['x-forwarded-for'] || req.headers['x-real-ip'] || null;
return _.isArray(ipAddress) ? ipAddress : ipAddress.split(',');
return ipAddress ? ipAddress.split(',') : null;
}

@@ -21,0 +20,0 @@ static detectIpFromConnectionOrSocket(req) {

import http = require('http');
import _ = require('lodash');

@@ -19,5 +18,5 @@ export class Util {

public static detectIpFromHeaders(req: http.IncomingMessage): string[] {
let ipAddress = req.headers['x-client-ip'] || req.headers['x-forwarded-for'] || req.headers['x-real-ip'] || null;
let ipAddress = req.headers['x-client-ip'] as string || req.headers['x-forwarded-for'] as string || req.headers['x-real-ip'] as string || null;
return _.isArray(ipAddress) ? ipAddress : ipAddress.split(',')
return ipAddress ? ipAddress.split(',') : null

@@ -24,0 +23,0 @@ }

@@ -27,3 +27,3 @@ {

"main": "./index.js",
"version": "6.0.18",
"version": "6.0.19",
"license": "MIT",

@@ -30,0 +30,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc