fix: 자동 갱신의 접속 벌점을 제외
메인 front status 조회는 접속 제한 gate만 적용하고 접속 점수는 기록하지 않는다. 실제 PostgreSQL 회귀 검증으로 access row가 생성되지 않는 경계를 고정한다.
This commit is contained in:
@@ -9,7 +9,6 @@ import { IdempotentTurnDaemonTransport } from './daemon/idempotentTransport.js';
|
||||
import { DuplicateInputEventError, executeInputEvent } from './inputEventBoundary.js';
|
||||
import {
|
||||
formatGeneralAccessLimitMessage,
|
||||
generalAccessLimitBeforeRecordEndpoints,
|
||||
generalAccessLimitEndpoints,
|
||||
getGeneralAccessState,
|
||||
recordGeneralAccessWeight,
|
||||
@@ -103,17 +102,8 @@ const generalAccessEndpointMiddleware = t.middleware(async ({ ctx, path, input,
|
||||
return next();
|
||||
}
|
||||
const endpoint = path as GeneralAccessEndpoint;
|
||||
if (generalAccessLimitBeforeRecordEndpoints.has(endpoint)) {
|
||||
const state = await getGeneralAccessState(ctx);
|
||||
if (state?.level === 2) {
|
||||
throw new TRPCError({
|
||||
code: 'TOO_MANY_REQUESTS',
|
||||
message: formatGeneralAccessLimitMessage(state),
|
||||
});
|
||||
}
|
||||
}
|
||||
await recordGeneralAccessWeight(ctx, weight);
|
||||
if (generalAccessLimitEndpoints.has(endpoint) && !generalAccessLimitBeforeRecordEndpoints.has(endpoint)) {
|
||||
if (generalAccessLimitEndpoints.has(endpoint)) {
|
||||
const state = await getGeneralAccessState(ctx);
|
||||
if (state?.level === 2) {
|
||||
throw new TRPCError({
|
||||
|
||||
Reference in New Issue
Block a user