A Deno-powered backend service for Plants vs. Zombies: MODDED. [Read-only GitHub mirror] docs.pvzm.net
express typescript expressjs plant deno jspvz pvzm game online backend plants-vs-zombies zombie javascript plants modded vs plantsvszombies openapi pvz noads
at main 7 lines 288 B view raw
1export function getClientIP(req: any): string { 2 const cfIp = req.headers?.["cf-connecting-ip"]; 3 const forwardedIp = req.headers?.["x-forwarded-for"]; 4 const remoteIp = req.socket?.remoteAddress || ""; 5 6 return cfIp || (typeof forwardedIp === "string" ? forwardedIp : "") || remoteIp; 7}