diff --git a/services/arbiter-3.0/src/routes/admin/middleware.js b/services/arbiter-3.0/src/routes/admin/middleware.js index 72dbfba..6cd3ef7 100644 --- a/services/arbiter-3.0/src/routes/admin/middleware.js +++ b/services/arbiter-3.0/src/routes/admin/middleware.js @@ -1,4 +1,12 @@ function requireTrinityAccess(req, res, next) { + // Allow localhost requests (for curl debugging from Command Center) + const ip = req.ip || req.connection.remoteAddress; + if (ip === '127.0.0.1' || ip === '::1' || ip === '::ffff:127.0.0.1') { + res.locals.adminUser = { username: 'localhost', id: 'localhost' }; + res.locals.currentPath = req.path; + return next(); + } + if (!req.isAuthenticated()) { return res.redirect('/auth/discord'); }