Use rate limiter policy classes and drop the /api/reading path bypass

Đang mở
#1,604 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp
Lĩnh vực
api, backend, security

Hướng nghiên cứu

Search for ContentRateLimiterPolicy, McpRateLimiterPolicy, the inline reading API limiter lambdas, and the global limiter's /api/reading bypass. Read the limiter registration and the reading API endpoint configuration first. Extract the reading policies as named policy classes and apply them with RequireRateLimiting; done means routed reading endpoints retain their intended limits and unrouted requests under /api/reading are no longer bypassed.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

The reading API rate limits are inline lambdas with magic numbers, and the global limiter special-cases /api/reading with a no-limiter bypass, so unrouted requests under that path are unlimited. The repo convention is policy classes (ContentRateLimiterPolicy, McpRateLimiterPolicy). Extract policies, name them accurately (GET profile currently uses a 'Write' policy), and use RequireRateLimiting/named policies instead of a path bypass.

Found during review of #1267; intentionally kept out of that PR.

Ngôn ngữ chính
HTML
Star
8
Fork
8
Merge trung bình
3 giờ 24 phút
Pull request đã merge (30 ngày)
91

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của IntelliTect/EssentialCSharp.Web

Tất cả issue của IntelliTect/EssentialCSharp.Web

Issue tương tự

Thêm issue về Backend & API Design

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.