Theo's Typesafe CultTTC
Theo's Typesafe Cult4y ago
9 replies
plyglt

Getting user IP in trpc without req object?

I used to get the users IP like so, just giving the package the req object:

const requestIp = require('request-ip');
const ip = requestIp.getClientIp(req);


With trpc, I don't have access to Next.JS's req object - how would I solve this now?
Was this page helpful?