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?
Solution:
req.headers['x-forwarded-for']
Jump to solution
4 Replies
Solution
barry
barry15mo ago
req.headers['x-forwarded-for']
barry
barry15mo ago
req.ip req.connection.remoteAddress Are the most common ways
lonelil
lonelil15mo ago
i dont think trpc provides the request object, could you show an example?
barry
barry15mo ago
It does Gotta go to your trpc file where the context is And pass it in yourself
Want results from more Discord servers?
Add your server
More Posts