add diaposine

This commit is contained in:
Kirill
2026-06-03 19:44:39 +05:00
parent 11c1e012d5
commit 5f18274b2c
3 changed files with 51 additions and 1 deletions
-1
View File
@@ -22,7 +22,6 @@ export function registerAuth(fastify) {
if (allowedList.length > 0) {
const reqIp = normalizeIp(request.ip)
request.log.info({ reqIp, rawIp: request.ip }, '[auth] admin IP check')
const isAllowed = allowedList.includes(reqIp) || allowedList.some((entry) => cidrMatch(reqIp, entry))
if (!isAllowed) {
return reply.code(403).send({ error: 'Доступ с данного IP запрещён' })