Resteasy security interceptor - how to obtain client IP address inside interceptor?

前端 未结 2 1679
庸人自扰
庸人自扰 2021-01-23 02:58

I have implemented an interceptor to carry out a security check on the client IP address with the following annotations - @Provider @ServerInterceptor @Precedence(\"SECURITY\")<

2条回答
  •  悲哀的现实
    2021-01-23 04:01

    The client IP address is available from the request object. But you can't use that for security purposes as it isn't unique per client: it might just be the address of the nearest proxy, even your own.

提交回复
热议问题