JSR-356 WebSockets with Tomcat - How to limit connections within single IP address?

后端 未结 3 1636
轮回少年
轮回少年 2020-12-14 12:54

I made a JSR-356 @ServerEndpoint in which I want to limit alive connections from single IP address, to prevent simple DDOS attacks.

Note that I\'m searc

3条回答
  •  甜味超标
    2020-12-14 13:34

    If you are using Tyrus which is JSR-356 compliant, then you can get the IP address from the Session instance, but this is a non-standard method.

    See here.

提交回复
热议问题