-
Notifications
You must be signed in to change notification settings - Fork 431
Add rate limit conf to user directory endpoint #19291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
67eac2f to
151b288
Compare
MadLittleMods
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable
| @@ -0,0 +1 @@ | |||
| Add a config to be able to rate limit search in the user directory. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's spawning this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The goal is to avoid that an user could scrape the user directory too quickly.
| burst_count: 5.0 | ||
| ``` | ||
| --- | ||
| ### `rc_user_directory` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also add this to the Complement config,
synapse/docker/complement/conf/workers-shared-extra.yaml.j2
Lines 34 to 35 in f79acff
| # Disable server rate-limiting | |
| rc_federation: |
And the demo script I guess:
Lines 103 to 105 in f79acff
| # Disable any rate limiting | |
| ratelimiting=$(cat <<-RC | |
| rc_message: |
The goal is to avoid that an user could scrape the user directory too quickly.
Pull Request Checklist
EventStoretoEventWorkerStore.".code blocks.