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
barry2y ago
req.headers['x-forwarded-for']
barry
barry2y ago
req.ip req.connection.remoteAddress Are the most common ways
lonelil
lonelil2y ago
i dont think trpc provides the request object, could you show an example?
barry
barry2y 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