Get IP of user using trpc?
is it possible to just get the ip of the user using trpc without just including it in the input?
4 Replies
Solution
req.headers['x-forwarded-for']
req.ip
req.connection.remoteAddress
Are the most common waysi dont think trpc provides the request object, could you show an example?
It does
Gotta go to your trpc file where the context is
And pass it in yourself