Explorar el Código

Add logging to debug nonfunctional IP allowlist

Connor Prussin hace 7 meses
padre
commit
133cc7f675
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  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)