@hono/node-server
Advanced tools
Comparing version
@@ -43,2 +43,3 @@ "use strict"; | ||
// src/request.ts | ||
var import_node_path = require("path"); | ||
var import_node_stream = require("stream"); | ||
@@ -69,3 +70,9 @@ var newRequestFromIncoming = (method, url, incoming) => { | ||
get url() { | ||
return `http://${this[incomingKey].headers.host}${this[incomingKey].url}`; | ||
let path = this[incomingKey]["path"]; | ||
if (!path) { | ||
const originalPath = this[incomingKey].url; | ||
path = /\.\./.test(originalPath) ? (0, import_node_path.resolve)(originalPath) : originalPath; | ||
this[incomingKey]["path"] = path; | ||
} | ||
return `http://${this[incomingKey].headers.host}${path}`; | ||
}, | ||
@@ -72,0 +79,0 @@ [getRequestCache]() { |
@@ -38,2 +38,3 @@ "use strict"; | ||
// src/request.ts | ||
var import_node_path = require("path"); | ||
var import_node_stream = require("stream"); | ||
@@ -64,3 +65,9 @@ var newRequestFromIncoming = (method, url, incoming) => { | ||
get url() { | ||
return `http://${this[incomingKey].headers.host}${this[incomingKey].url}`; | ||
let path = this[incomingKey]["path"]; | ||
if (!path) { | ||
const originalPath = this[incomingKey].url; | ||
path = /\.\./.test(originalPath) ? (0, import_node_path.resolve)(originalPath) : originalPath; | ||
this[incomingKey]["path"] = path; | ||
} | ||
return `http://${this[incomingKey].headers.host}${path}`; | ||
}, | ||
@@ -67,0 +74,0 @@ [getRequestCache]() { |
@@ -26,2 +26,3 @@ "use strict"; | ||
module.exports = __toCommonJS(request_exports); | ||
var import_node_path = require("path"); | ||
var import_node_stream = require("stream"); | ||
@@ -52,3 +53,9 @@ var newRequestFromIncoming = (method, url, incoming) => { | ||
get url() { | ||
return `http://${this[incomingKey].headers.host}${this[incomingKey].url}`; | ||
let path = this[incomingKey]["path"]; | ||
if (!path) { | ||
const originalPath = this[incomingKey].url; | ||
path = /\.\./.test(originalPath) ? (0, import_node_path.resolve)(originalPath) : originalPath; | ||
this[incomingKey]["path"] = path; | ||
} | ||
return `http://${this[incomingKey].headers.host}${path}`; | ||
}, | ||
@@ -55,0 +62,0 @@ [getRequestCache]() { |
@@ -40,2 +40,3 @@ "use strict"; | ||
// src/request.ts | ||
var import_node_path = require("path"); | ||
var import_node_stream = require("stream"); | ||
@@ -66,3 +67,9 @@ var newRequestFromIncoming = (method, url, incoming) => { | ||
get url() { | ||
return `http://${this[incomingKey].headers.host}${this[incomingKey].url}`; | ||
let path = this[incomingKey]["path"]; | ||
if (!path) { | ||
const originalPath = this[incomingKey].url; | ||
path = /\.\./.test(originalPath) ? (0, import_node_path.resolve)(originalPath) : originalPath; | ||
this[incomingKey]["path"] = path; | ||
} | ||
return `http://${this[incomingKey].headers.host}${path}`; | ||
}, | ||
@@ -69,0 +76,0 @@ [getRequestCache]() { |
@@ -38,2 +38,3 @@ "use strict"; | ||
// src/request.ts | ||
var import_node_path = require("path"); | ||
var import_node_stream = require("stream"); | ||
@@ -64,3 +65,9 @@ var newRequestFromIncoming = (method, url, incoming) => { | ||
get url() { | ||
return `http://${this[incomingKey].headers.host}${this[incomingKey].url}`; | ||
let path = this[incomingKey]["path"]; | ||
if (!path) { | ||
const originalPath = this[incomingKey].url; | ||
path = /\.\./.test(originalPath) ? (0, import_node_path.resolve)(originalPath) : originalPath; | ||
this[incomingKey]["path"] = path; | ||
} | ||
return `http://${this[incomingKey].headers.host}${path}`; | ||
}, | ||
@@ -67,0 +74,0 @@ [getRequestCache]() { |
{ | ||
"name": "@hono/node-server", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Node.js Adapter for Hono", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
123359
2.19%3832
1.86%