outers
Version:
outers - a all in one package for your day to day use
137 lines • 5.16 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.RequestLoggerCredentials = exports.TodayDate = exports.AllowedMethods = exports.IPAllowedMethods = exports.XPoweredBy = exports.ServerName = void 0;
const NumFunction_1 = __importDefault(require("../../UniqueGen/Function/NumFunction")); // Unique Generator Library
// Server Name & X-Powered-By Headers
const AllServerNames = [
"Google LLC",
"Microsoft Corporation",
"Apple Inc.",
"Amazon.com Inc.",
"Facebook Inc.",
"Alphabet Inc.",
"Alibaba Group Holding Limited",
"Tencent Holdings Limited",
"Samsung Electronics Co., Ltd.",
"Cisco Systems, Inc.",
"Intel Corporation",
"Oracle Corporation",
"IBM Corporation",
"Huawei Technologies Co., Ltd.",
"NVIDIA Corporation",
"Adobe Inc.",
"Salesforce.com, Inc.",
"Qualcomm Incorporated",
"VMware, Inc.",
"PayPal Holdings, Inc.",
"Sony Corporation",
"Dell Technologies Inc.",
"HP Inc.",
"Lenovo Group Limited",
"Nokia Corporation",
"Twitter, Inc.",
"Uber Technologies, Inc.",
"eBay Inc.",
"Netflix, Inc.",
"Airbnb, Inc.",
"Lyft, Inc.",
"Snap Inc.",
"Pinterest, Inc.",
"Dropbox, Inc.",
"Spotify Technology S.A.",
"Slack Technologies, Inc.",
"Zoom Video Communications, Inc.",
"Square, Inc.",
"Zynga Inc.",
"Electronic Arts Inc.",
"Activision Blizzard, Inc.",
"Take-Two Interactive Software, Inc.",
"Nintendo Co., Ltd.",
"Sony Interactive Entertainment LLC",
"Microsoft Studios",
"Ubisoft Entertainment SA",
"Capcom Co., Ltd.",
"Sega Corporation",
"Konami Digital Entertainment Co., Ltd.",
"Bandai Namco Entertainment Inc.",
"Square Enix Holdings Co., Ltd.",
"Tencent Games",
"NetEase, Inc.",
"Epic Games, Inc.",
"Riot Games, Inc.",
"Supercell Oy",
"King Digital Entertainment",
"Niantic, Inc.",
"Roblox Corporation",
"Unity Technologies ApS",
"Valve Corporation",
"Electronic Arts Inc.",
"Activision Blizzard, Inc.",
"Take-Two Interactive Software, Inc.",
"Nintendo Co., Ltd.",
"Sony Interactive Entertainment LLC",
"Microsoft Studios",
"Ubisoft Entertainment SA",
"Capcom Co., Ltd.",
"Sega Corporation",
"Konami Digital Entertainment Co., Ltd.",
"Bandai Namco Entertainment Inc.",
"Square Enix Holdings Co., Ltd.",
"Tencent Games",
"NetEase, Inc.",
"Epic Games, Inc.",
"Riot Games, Inc.",
"Supercell Oy",
"King Digital Entertainment",
"Niantic, Inc.",
"Roblox Corporation",
"Unity Technologies ApS",
"Valve Corporation",
"Electronic Arts Inc.",
"Activision Blizzard Inc",
"Take-Two Interactive Software Inc",
"Nintendo Co Ltd",
"Sony Interactive Entertainment LLC",
"Ola Electric Mobility Pvt. Ltd.",
"Ubisoft Entertainment SA",
"Capcom Co Ltd",
"Sega Corporation",
"Konami Digital Entertainment Co Ltd",
"Bandai Namco Entertainment Inc",
"Square Enix Holdings Co Ltd",
"Tencent Games",
"NetEase Inc",
"Epic Games Inc",
"Riot Games Inc",
];
// Constants generator for Server Name Headers
const ServerName = () => {
const RandomLengthPicker = (0, NumFunction_1.default)(1, false, [1, 2]); // Random Choice to pick a Server Name
const RandomServerNamePicker = (0, NumFunction_1.default)(RandomLengthPicker, true); // Random Server Name Position Picker
// Return Random Server Name
return AllServerNames[RandomServerNamePicker]; // Return Random Server Name
}; // Set Server Name
exports.ServerName = ServerName;
// Constants generator for X-Powered-By Header
const XPoweredBy = () => {
const RandomLengthPicker = (0, NumFunction_1.default)(1, false, [1, 2]); // Random Choice to pick a X-Powered-By Header
const RandomServerNamePicker = (0, NumFunction_1.default)(RandomLengthPicker, true); // Random Server Name Position Picker
// Return X-Powered-By Header
return AllServerNames[RandomServerNamePicker].split(" ")[0]; // Return Random Server Name
}; // Set X-Powered-By Header
exports.XPoweredBy = XPoweredBy;
// Constants for Allowed HTTP Methods in IP Injection Middleware
exports.IPAllowedMethods = ["PUT", "POST", "PATCH", "DELETE"]; // Allowed Methods
// Constants for Allowed HTTP Methods in Request Controller Middleware
exports.AllowedMethods = [...exports.IPAllowedMethods, "OPTIONS"]; // Allowed Methods
// Constants for Request Counter Storage
exports.TodayDate = new Date().toLocaleDateString(); // Get Today's Date
exports.RequestLoggerCredentials = {
RequestLoggerStorageName: "Request-Log-details-for-nodejs", // Request Logger Storage Name
RequestLoggerStorageEncryptionKey: "Request#Log$details%for$nodejs%with!encryption@key#and&it/can*be#access(only)with#specific$function", // Request Logger Storage Encryption
RequestLoggerStorageDefaultSize: 99000000, // Default Storage is 99TB
};
//# sourceMappingURL=Middleware.Constant.js.map