New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@simonbackx/simple-endpoints

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

@simonbackx/simple-endpoints - npm Package Compare versions

Comparing version 1.9.2 to 1.10.0

1

dist/src/Request.d.ts

@@ -26,2 +26,3 @@ /// <reference types="node" />

static buildJson(method: HttpMethod, url: string, host?: string, body?: any): Request;
getIP(): string;
/**

@@ -28,0 +29,0 @@ * Return the number in the X-Version header or throw if invalid

@@ -65,2 +65,13 @@ "use strict";

}
getIP() {
var _a;
let ipAddress = (_a = this.request) === null || _a === void 0 ? void 0 : _a.socket.remoteAddress;
if (this.headers["x-real-ip"] && typeof this.headers["x-real-ip"] == "string" && (ipAddress == "127.0.0.1" || ipAddress == "0.0.0.0")) {
ipAddress = this.headers["x-real-ip"];
}
if (!ipAddress) {
ipAddress = '?';
}
return ipAddress.split(":", 2)[0];
}
/**

@@ -67,0 +78,0 @@ * Return the number in the X-Version header or throw if invalid

2

package.json

@@ -5,3 +5,3 @@ {

"types": "./dist/index.d.ts",
"version": "1.9.2",
"version": "1.10.0",
"scripts": {

@@ -8,0 +8,0 @@ "test": "jest --setupFiles dotenv/config",

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