Skip to content

Commit 133cc7f

Browse files
committed
Add logging to debug nonfunctional IP allowlist
1 parent c453c84 commit 133cc7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

apps/staking/src/middleware.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ const proxyCheckClient = PROXYCHECK_API_KEY
2727
: undefined;
2828

2929
export const middleware = async (request: NextRequest) => {
30+
// eslint-disable-next-line no-console
31+
console.log("IP Allowlist:", IP_ALLOWLIST);
32+
// eslint-disable-next-line no-console
33+
console.log("Are they allowed?", isIpAllowlisted("163.116.252.75"));
3034
const ip = ipAddress(request);
3135
if (isIpAllowlisted(ip)) {
3236
return isBlockedSegment(request)

0 commit comments

Comments
 (0)