Twan07 commited on
Commit
7526c57
·
verified ·
1 Parent(s): 48ea5af

Create src/middleware/adminIp.js

Browse files
Files changed (1) hide show
  1. src/middleware/adminIp.js +6 -0
src/middleware/adminIp.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import { ADMIN_IP_ALLOWLIST } from "../config/security.js";
2
+
3
+ export function adminIp(req, res, next) {
4
+ if (!ADMIN_IP_ALLOWLIST.includes(req.ip)) return res.sendStatus(403);
5
+ next();
6
+ }