@@ -12,3 +12,4 @@ // src/adapter/aws-lambda/conninfo.ts | ||
| if (xff) { | ||
| address = xff.split(",")[0].trim(); | ||
| const ips = xff.split(","); | ||
| address = ips[ips.length - 1].trim(); | ||
| } | ||
@@ -15,0 +16,0 @@ } |
@@ -34,3 +34,4 @@ "use strict"; | ||
| if (xff) { | ||
| address = xff.split(",")[0].trim(); | ||
| const ips = xff.split(","); | ||
| address = ips[ips.length - 1].trim(); | ||
| } | ||
@@ -37,0 +38,0 @@ } |
@@ -348,5 +348,2 @@ "use strict"; | ||
| body = (data, arg, headers) => this.#newResponse(data, arg, headers); | ||
| #useFastPath() { | ||
| return !this.#preparedHeaders && !this.#status && !this.finalized; | ||
| } | ||
| /** | ||
@@ -365,3 +362,3 @@ * `.text()` can render text as `Content-Type:text/plain`. | ||
| text = (text, arg, headers) => { | ||
| return this.#useFastPath() && !arg && !headers ? createResponseInstance(text) : this.#newResponse( | ||
| return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse( | ||
| text, | ||
@@ -385,3 +382,3 @@ arg, | ||
| json = (object, arg, headers) => { | ||
| return this.#useFastPath() && !arg && !headers ? Response.json(object) : this.#newResponse( | ||
| return this.#newResponse( | ||
| JSON.stringify(object), | ||
@@ -388,0 +385,0 @@ arg, |
+2
-5
@@ -325,5 +325,2 @@ // src/context.ts | ||
| body = (data, arg, headers) => this.#newResponse(data, arg, headers); | ||
| #useFastPath() { | ||
| return !this.#preparedHeaders && !this.#status && !this.finalized; | ||
| } | ||
| /** | ||
@@ -342,3 +339,3 @@ * `.text()` can render text as `Content-Type:text/plain`. | ||
| text = (text, arg, headers) => { | ||
| return this.#useFastPath() && !arg && !headers ? createResponseInstance(text) : this.#newResponse( | ||
| return !this.#preparedHeaders && !this.#status && !arg && !headers && !this.finalized ? new Response(text) : this.#newResponse( | ||
| text, | ||
@@ -362,3 +359,3 @@ arg, | ||
| json = (object, arg, headers) => { | ||
| return this.#useFastPath() && !arg && !headers ? Response.json(object) : this.#newResponse( | ||
| return this.#newResponse( | ||
| JSON.stringify(object), | ||
@@ -365,0 +362,0 @@ arg, |
+1
-1
| { | ||
| "name": "hono", | ||
| "version": "4.12.1", | ||
| "version": "4.12.2", | ||
| "description": "Web framework built on Web Standards", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1272860
-0.01%35550
-0.01%