Download src/middleware/adminIp.js from TwanAPI/trsstapi: direct link, hf CLI and curl.
- Browser
- Download file 187 Bytes
-
https://huggingface.co/spaces/TwanAPI/trsstapi/resolve/aaff83dd1affe87e82019cb318c593e9d15fa2fd/src/middleware/adminIp.js
- Command line
-
hf download hf://spaces/TwanAPI/trsstapi@aaff83dd1affe87e82019cb318c593e9d15fa2fd/src/middleware/adminIp.js
-
curl -L -o adminIp.js https://huggingface.co/spaces/TwanAPI/trsstapi/resolve/aaff83dd1affe87e82019cb318c593e9d15fa2fd/src/middleware/adminIp.js
187 Bytes
| import { ADMIN_IP_ALLOWLIST } from "../config/security.js"; | |
| export function adminIp(req, res, next) { | |
| if (!ADMIN_IP_ALLOWLIST.includes(req.ip)) return res.sendStatus(403); | |
| next(); | |
| } | |