express-req-res-helper
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -32,3 +32,4 @@ "use strict"; | ||
const protocol = req.hostname.includes("localhost") ? "http" : "https"; | ||
return `${protocol}://${req.hostname}${req.originalUrl}`; | ||
const port = protocol === "http" ? process.env.PORT || "" : ""; | ||
return `${protocol}://${req.hostname}${port}${req.originalUrl}`; | ||
}; | ||
@@ -35,0 +36,0 @@ const ExpressHelper = { |
@@ -42,3 +42,4 @@ import { Request } from "express"; | ||
const protocol = req.hostname.includes("localhost") ? "http" : "https"; | ||
return `${protocol}://${req.hostname}${req.originalUrl}`; | ||
const port = protocol === "http" ? process.env.PORT || "" :""; | ||
return `${protocol}://${req.hostname}${port}${req.originalUrl}`; | ||
}; | ||
@@ -45,0 +46,0 @@ |
{ | ||
"name": "express-req-res-helper", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"prepublish": "npm run build", | ||
@@ -5,0 +5,0 @@ "description": "this is a utility package to help extract a header from http request", |
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
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
5621
141