We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
例如一个链接最多连接的ip数量为3
The text was updated successfully, but these errors were encountered:
最简单的方法就是在apps/urls/views.py下的RedirectView处理,在get方法中,使用redis的set结构,假设你要限制最多n个ip:
如果scard 短码 得到的数量小于n
则执行sadd 短码 ip 将新进来的ip加入短码为key的set中
否则,说明该短码已经绑定了n个ip, 则使用sismember查看当前进来的请求ip是否在该短码下,如果是,则允许跳转,反之则不跳转
Sorry, something went wrong.
skyxv
No branches or pull requests
例如一个链接最多连接的ip数量为3
The text was updated successfully, but these errors were encountered: