aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/modules/diff-file.test.ts
diff options
context:
space:
mode:
authorRowan Bohde <rowan@allspice.io>2025-04-14 09:25:48 -0500
committerGitHub <noreply@github.com>2025-04-14 16:25:48 +0200
commitc57304ac3f4206db1016b035fb89117bcd3d89bc (patch)
treef5598edaff9f5f257abdc89a19bd7ea470dc5416 /web_src/js/modules/diff-file.test.ts
parent3a9fcac11b018c0444a78a6011d13e27f278c426 (diff)
downloadgitea-c57304ac3f4206db1016b035fb89117bcd3d89bc.tar.gz
gitea-c57304ac3f4206db1016b035fb89117bcd3d89bc.zip
Add middleware for request prioritization (#33951)
This adds a middleware for overload protection that is intended to help protect against malicious scrapers. It does this via [`codel`](https://github.com/bohde/codel), which will perform the following: 1. Limit the number of in-flight requests to some user-defined max 2. When in-flight requests have reached their begin queuing requests. Logged-in requests having priority above logged-out requests 3. Once a request has been queued for too long, it has a probabilistic chance to be rejected based on how overloaded the entire system is. When a server experiences more traffic than it can handle, this keeps latency low for logged-in users and rejects just enough requests from logged-out users to not overload the service. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'web_src/js/modules/diff-file.test.ts')
0 files changed, 0 insertions, 0 deletions