@tinypudding/puddy-lib
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -7,11 +7,11 @@ // Module Base | ||
// Hostname | ||
// X Forwarded Host | ||
{ | ||
type: 'hostname', | ||
type: 'x-forwarded-host', | ||
callback: function (req, the_domain) { | ||
const isString = (typeof req.hostname === "string"); | ||
const isString = (typeof req.headers['x-forwarded-host'] === "string"); | ||
if (the_domain) { | ||
if (isString && req.hostname === the_domain) { return true; } else { return false; } | ||
if (isString && req.headers['x-forwarded-host'] === the_domain) { return true; } else { return false; } | ||
} else { | ||
if (isString) { return req.hostname; } else { return null; } | ||
if (isString) { return req.headers['x-forwarded-host']; } else { return null; } | ||
} | ||
@@ -21,11 +21,11 @@ } | ||
// X Forwarded Host | ||
// Hostname | ||
{ | ||
type: 'x-forwarded-host', | ||
type: 'hostname', | ||
callback: function (req, the_domain) { | ||
const isString = (typeof req.headers['x-forwarded-host'] === "string"); | ||
const isString = (typeof req.hostname === "string"); | ||
if (the_domain) { | ||
if (isString && req.headers['x-forwarded-host'] === the_domain) { return true; } else { return false; } | ||
if (isString && req.hostname === the_domain) { return true; } else { return false; } | ||
} else { | ||
if (isString) { return req.headers['x-forwarded-host']; } else { return null; } | ||
if (isString) { return req.hostname; } else { return null; } | ||
} | ||
@@ -32,0 +32,0 @@ } |
@@ -33,4 +33,7 @@ // Modules | ||
// Custom Module Loader | ||
'customModuleManager': require('./libs/custom_module_loader') | ||
'customModuleManager': require('./libs/custom_module_loader'), | ||
// Errors Callback | ||
'errorsCallback': require('./http/errorsCallback') | ||
}; |
{ | ||
"name": "@tinypudding/puddy-lib", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Essential codes to run the other repositories from the Tiny Pudding Account.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
57929
25
758