Socket
Socket
Sign inDemoInstall

@tinypudding/puddy-lib

Package Overview
Dependencies
Maintainers
1
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tinypudding/puddy-lib - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

http/errorsCallback.js

20

http/check_domain.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc