Comparing version 0.0.0 to 0.0.1
@@ -36,6 +36,12 @@ "use strict"; | ||
} | ||
if (process.env.CONTENT_TYPE) { | ||
headers.set("content-type", process.env.CONTENT_TYPE); | ||
} | ||
if (process.env.CONTENT_LENGTH) { | ||
headers.set("content-length", process.env.CONTENT_LENGTH); | ||
} | ||
const method = process.env.REQUEST_METHOD; | ||
const url = process.env.REQUEST_URI; | ||
if (!url) { | ||
throw new Error("REQUEST_URI not set"); | ||
let url = `${/https/i.test(process.env.SERVER_PROTOCOL ?? "") ? "https" : "http"}://${process.env.SERVER_NAME}:${process.env.SERVER_PORT}${process.env.PATH_INFO}`; | ||
if (process.env.QUERY_STRING) { | ||
url += `?${process.env.QUERY_STRING}`; | ||
} | ||
@@ -51,2 +57,4 @@ return new Request(url, { | ||
console.log(`Status: ${response.status}`); | ||
} else { | ||
console.log(`Status: ${response.status} OK`); | ||
} | ||
@@ -53,0 +61,0 @@ for (const [key, value] of response.headers) { |
{ | ||
"name": "web-cgi", | ||
"version": "0.0.0", | ||
"version": "0.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 7 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
4873
142
25