randydev commited on
Commit
2aac949
·
verified ·
1 Parent(s): 26750b4
Files changed (1) hide show
  1. middleware/midware.js +1 -7
middleware/midware.js CHANGED
@@ -41,21 +41,15 @@ const authenticateApiKeyPremium = async (req, res, next) => {
41
 
42
  const authenticateApiKeyDev = async (req, res, next) => {
43
  const apiKey = req.headers['x-api-key'];
44
- const xhacker = req.headers['x-hacker-bypass-v1'];
45
 
46
  const dbClient = new Database("AkenoXJs");
47
  const db = dbClient.collection("api_keys_dev");
48
 
49
- if (!apiKey && !xhacker) {
50
  return res.status(401).json({ error: 'API Key or bypass token required' });
51
  }
52
 
53
  try {
54
- if (xhacker === "@xpushz") {
55
- console.log("Bypass activated via x-hacker-bypass-v1");
56
- return next();
57
- }
58
-
59
 
60
  const keyDoc = await db.findOne({ key: apiKey });
61
  if (!keyDoc) {
 
41
 
42
  const authenticateApiKeyDev = async (req, res, next) => {
43
  const apiKey = req.headers['x-api-key'];
 
44
 
45
  const dbClient = new Database("AkenoXJs");
46
  const db = dbClient.collection("api_keys_dev");
47
 
48
+ if (!apiKey) {
49
  return res.status(401).json({ error: 'API Key or bypass token required' });
50
  }
51
 
52
  try {
 
 
 
 
 
53
 
54
  const keyDoc = await db.findOne({ key: apiKey });
55
  if (!keyDoc) {