Socket
Socket
Sign inDemoInstall

@arcjet/ip

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arcjet/ip - npm Package Compare versions

Comparing version 1.0.0-alpha.12 to 1.0.0-alpha.13

12

index.js

@@ -111,3 +111,3 @@ function parseXForwardedFor(value) {

const hasLeadingZero = p.peakChar() === "0";
let nextCharAsDigit = () => {
function nextCharAsDigit() {
return p.readAtomically((p) => {

@@ -122,3 +122,3 @@ const c = p.readChar();

});
};
}
for (let digit = nextCharAsDigit(); digit !== undefined; digit = nextCharAsDigit()) {

@@ -177,3 +177,3 @@ result = result * radix;

if (isIPv4Tuple(ipv4)) {
let [one, two, three, four] = ipv4;
const [one, two, three, four] = ipv4;
groups[i + 0] = u16FromBytes([one, two]);

@@ -513,2 +513,8 @@ groups[i + 1] = u16FromBytes([three, four]);

}
// Fly.io
// Fly-Client-IP: https://fly.io/docs/networking/request-headers/#fly-client-ip
const flyClientIP = headers.get("fly-client-ip");
if (isGlobalIP(flyClientIP)) {
return flyClientIP;
}
// Default nginx proxy/fcgi; alternative to x-forwarded-for, used by some proxies

@@ -515,0 +521,0 @@ // X-Real-IP

@@ -137,3 +137,3 @@ function parseXForwardedFor(value?: string | null): string[] {

let nextCharAsDigit = () => {
function nextCharAsDigit() {
return p.readAtomically((p) => {

@@ -148,3 +148,3 @@ const c = p.readChar();

});
};
}

@@ -210,3 +210,3 @@ for (

if (isIPv4Tuple(ipv4)) {
let [one, two, three, four] = ipv4;
const [one, two, three, four] = ipv4;
groups[i + 0] = u16FromBytes([one, two]);

@@ -643,2 +643,9 @@ groups[i + 1] = u16FromBytes([three, four]);

// Fly.io
// Fly-Client-IP: https://fly.io/docs/networking/request-headers/#fly-client-ip
const flyClientIP = headers.get("fly-client-ip");
if (isGlobalIP(flyClientIP)) {
return flyClientIP;
}
// Default nginx proxy/fcgi; alternative to x-forwarded-for, used by some proxies

@@ -645,0 +652,0 @@ // X-Real-IP

{
"name": "@arcjet/ip",
"version": "1.0.0-alpha.12",
"version": "1.0.0-alpha.13",
"description": "Arcjet utilities for finding the originating IP of a request",

@@ -44,7 +44,7 @@ "license": "Apache-2.0",

"devDependencies": {
"@arcjet/eslint-config": "1.0.0-alpha.12",
"@arcjet/rollup-config": "1.0.0-alpha.12",
"@arcjet/tsconfig": "1.0.0-alpha.12",
"@arcjet/eslint-config": "1.0.0-alpha.13",
"@arcjet/rollup-config": "1.0.0-alpha.13",
"@arcjet/tsconfig": "1.0.0-alpha.13",
"@jest/globals": "29.7.0",
"@rollup/wasm-node": "4.14.3",
"@rollup/wasm-node": "4.17.2",
"@types/node": "18.18.0",

@@ -51,0 +51,0 @@ "jest": "29.7.0",

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