Skip to content

Commit

Permalink
remove the explicit routes
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy committed Sep 20, 2024
1 parent 8f47308 commit d825938
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/phoenix/server/api/routers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,13 @@
UserId,
)

rate_limiter = ServerRateLimiter(
per_second_rate_limit=0.2,
enforcement_window_seconds=30,
partition_seconds=60,
active_partitions=2,
)
login_rate_limiter = fastapi_ip_rate_limiter(
rate_limiter,
paths=[
"/auth/login",
"/auth/logout",
"/auth/refresh",
"/auth/password-reset-email",
"/auth/password-reset",
],
ServerRateLimiter(
per_second_rate_limit=0.2,
enforcement_window_seconds=30,
partition_seconds=60,
active_partitions=2,
)
)
router = APIRouter(
prefix="/auth", include_in_schema=False, dependencies=[Depends(login_rate_limiter)]
Expand Down

0 comments on commit d825938

Please sign in to comment.