mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-19 00:50:30 +00:00
Make some last minute production changes
This commit is contained in:
parent
f7ff77d865
commit
69bee64a59
8 changed files with 166 additions and 61 deletions
|
@ -1935,6 +1935,12 @@ FUNCTIONS
|
|||
If the client ignores this warning and keeps sending requests, until
|
||||
there's no tokens left, then the banhammer finally comes down.
|
||||
|
||||
function OnServerStart()
|
||||
ProgramTokenBucket()
|
||||
ProgramTrustedIp(ParseIp('x.x.x.x'), 32)
|
||||
assert(unix.setrlimit(unix.RLIMIT_NPROC, 1000, 1000))
|
||||
end
|
||||
|
||||
This model of network rate limiting generously lets people "burst" a
|
||||
tiny bit. For example someone might get a strong craving for content
|
||||
and smash the reload button in Chrome 64 times in a fow seconds. But
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue