Skip to content

Commit fd2cd84

Browse files
committed
Add logging to debug nonfunctional IP allowlist
1 parent 1e5290a commit fd2cd84

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-log
31+
console.log("IP Allowlist:", IP_ALLOWLIST);
32+
// eslint-disable-next-line no-log
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)