Ver código fonte

Add logging to debug nonfunctional IP allowlist

Connor Prussin 7 meses atrás
pai
commit
133cc7f675
1 arquivos alterados com 4 adições e 0 exclusões
  1. 4 0
      apps/staking/src/middleware.ts

+ 4 - 0
apps/staking/src/middleware.ts

@@ -27,6 +27,10 @@ const proxyCheckClient = PROXYCHECK_API_KEY
   : undefined;
 
 export const middleware = async (request: NextRequest) => {
+  // eslint-disable-next-line no-console
+  console.log("IP Allowlist:", IP_ALLOWLIST);
+  // eslint-disable-next-line no-console
+  console.log("Are they allowed?", isIpAllowlisted("163.116.252.75"));
   const ip = ipAddress(request);
   if (isIpAllowlisted(ip)) {
     return isBlockedSegment(request)