Rate-limit faceted listings under every locale prefix - #192
Merged
Merged
Conversation
…etter ones
The flood-protection router matched `^/([a-z]{2}(-[A-Za-z]{2})?/)?games/?$`,
so `/zh-Hans/games?...` (a four-letter script subtag) never reached it and fell
through to the unprotected `mui-site` router. On 2026-09-21 that was 44,825 of
~75,600 requests in an hour: a crawler walking facet combinations under the
Chinese locale, with no per-client, per-host or in-flight bound in front of it.
Traefik sat at its 512 MiB cgroup ceiling (OOM-killed on 09-15 and 09-17 as
well), its active healthcheck against web-2 timed out while web-2 itself
answered /health in 2 ms, the only backend was marked down, and the site
served 503 and then Cloudflare 522.
The prefix now admits any BCP 47-shaped tag (`zh-Hans`, `qps-ploc`,
`ru-x-canary`) and still refuses `/account/games` and `/games/<slug>`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Essentials Run ID: 📒 Files selected for processing (1)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened (2026-09-21, ~03:00Z onward)
mu-index.com returns Cloudflare 522. The web container is fine (
/health2 ms from inside it); Traefik is the failure./zh-Hans/games?…, and every one went tomui-site@docker, notmui-games-protection@file.^/([a-z]{2}(-[A-Za-z]{2})?/)?games/?$only admits a two-letter subtag.zh-Hanshas four, so the Chinese-locale flood skipped the per-client, per-host and in-flight limits entirely.Change
Prefix is now
^/([a-z]{2,3}(-[A-Za-z0-9]{1,8})*/)?games/?$, which matches/games,/de/games,/zh-Hans/games,/qps-ploc/games,/ru-x-canary/gamesand still refuses/games/<slug>and/account/games.Deploying
The file provider watches
deploy/traefik, so the router changes ongit pull --ff-onlyin/opt/muindex. Traefik also needsdocker restart muindex-traefik-1to shed the heap it is currently thrashing in.🤖 Generated with Claude Code