Handle all new rate limits in demo scripts (#9858)
This commit is contained in:
parent
177dae2704
commit
c1ddbbde4f
|
@ -0,0 +1 @@
|
||||||
|
Handle recently added rate limits correctly when using `--no-rate-limit` with the demo scripts.
|
|
@ -96,18 +96,48 @@ for port in 8080 8081 8082; do
|
||||||
# Check script parameters
|
# Check script parameters
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
if [ $1 = "--no-rate-limit" ]; then
|
if [ $1 = "--no-rate-limit" ]; then
|
||||||
# messages rate limit
|
|
||||||
echo 'rc_messages_per_second: 1000' >> $DIR/etc/$port.config
|
|
||||||
echo 'rc_message_burst_count: 1000' >> $DIR/etc/$port.config
|
|
||||||
|
|
||||||
# registration rate limit
|
# Disable any rate limiting
|
||||||
printf 'rc_registration:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
|
ratelimiting=$(cat <<-RC
|
||||||
|
rc_message:
|
||||||
# login rate limit
|
per_second: 1000
|
||||||
echo 'rc_login:' >> $DIR/etc/$port.config
|
burst_count: 1000
|
||||||
printf ' address:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
|
rc_registration:
|
||||||
printf ' account:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
|
per_second: 1000
|
||||||
printf ' failed_attempts:\n per_second: 1000\n burst_count: 1000\n' >> $DIR/etc/$port.config
|
burst_count: 1000
|
||||||
|
rc_login:
|
||||||
|
address:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
account:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
failed_attempts:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
rc_admin_redaction:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
rc_joins:
|
||||||
|
local:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
remote:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
rc_3pid_validation:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
rc_invites:
|
||||||
|
per_room:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
per_user:
|
||||||
|
per_second: 1000
|
||||||
|
burst_count: 1000
|
||||||
|
RC
|
||||||
|
)
|
||||||
|
echo "${ratelimiting}" >> $DIR/etc/$port.config
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue