how can i get the client ip address?
cnJun opened this issue · comments
cnJun commented
how can i get the client ip address from my service implement?
andrewcox commented
There is now a way as of the merge of #57:
RequestContext.getCurrentContext().getRemoteAddress()
It uses a static thread-local, so it will of course only work if you ask for the context from the thread on which nifty original calls your handler.
cnJun commented
RequestContexts.getCurrentContext().getRemoteAddress();