Rate limit: 100 at once, 10 a second; the page's own files uncounted #13

Merged
bl merged 1 commits from rate-limit into main 2026-09-30 17:52:09 +00:00
Owner

A page with a picture strip made over 30 requests in one load, so a few reloads used up the old burst of 30 and the stylesheet came back 429.

  • Burst 100, refilled at 10/s (more than 100 in 10 s is a script).
  • The files from portal's own disk (/pkg, fonts, favicons, vendored libraries, page-motion.js) are served outside the limit and without a session. Content pictures (/site/, fetched from Gitea) and map tiles stay counted.
  • PORTAL_RATE_PER_SECOND replaces PORTAL_RATE_SECONDS; no site set it.

Checked locally: 300 stylesheet and 200 favicon requests, 20 at a time, all 200 and the page still 200 right after; 150 page requests, 20 at a time, 102 through then 429.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt

A page with a picture strip made over 30 requests in one load, so a few reloads used up the old burst of 30 and the stylesheet came back 429. - Burst 100, refilled at 10/s (more than 100 in 10 s is a script). - The files from portal's own disk (`/pkg`, fonts, favicons, vendored libraries, page-motion.js) are served outside the limit and without a session. Content pictures (`/site/`, fetched from Gitea) and map tiles stay counted. - `PORTAL_RATE_PER_SECOND` replaces `PORTAL_RATE_SECONDS`; no site set it. Checked locally: 300 stylesheet and 200 favicon requests, 20 at a time, all 200 and the page still 200 right after; 150 page requests, 20 at a time, 102 through then 429. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01GT37Z1Xtfd9pUuQtMTg6Yt
bl added 1 commit 2026-09-30 17:51:50 +00:00
bl merged commit 3b17e6440e into main 2026-09-30 17:52:09 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uhhm/portal#13