We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f55dff1 commit 94157afCopy full SHA for 94157af
src/main/java/org/b3log/symphony/processor/middleware/AnonymousViewCheckMidware.java
@@ -197,7 +197,7 @@ public void handle(final RequestContext context) {
197
ipFirstVisitTimeCache.put(ip, firstVisitTime);
198
}
199
200
- // 计数逻辑(包含两种策略:2 小时内首次访问一次验证码,其后每 10 次一次)
+ // 计数逻辑(包含两种策略:2 小时内首次访问一次验证码,其后每 5 次一次)
201
Integer count = ipVisitCountCache.getIfPresent(ip);
202
if (count == null) count = 0;
203
count++;
@@ -217,8 +217,8 @@ public void handle(final RequestContext context) {
217
218
219
220
- // 之后每访问 10 次需要一次验证码
221
- if (!needCaptcha && count % 10 == 0) {
+ // 之后每访问 5 次需要一次验证码
+ if (!needCaptcha && count % 5 == 0) {
222
needCaptcha = true;
223
224
0 commit comments