Skip to content

Conversation

@strangeglyph
Copy link

Do not mention the DB config table. Instead explain how the JSON configuration file looks and how to tell spacebar where to find it

Comment on lines +96 to +117
| `rate.ip.count` | 500 | number | Allowed number of requests per IP within window |
| `rate.ip.window` | 5 | number | IP rate limit window, in seconds |
| `rate.global.count` | 250 | number | Allowed number of requests globally within window |
| `rate.global.window` | 5 | number | Global rate limit window, in seconds |
| `rate.error.count` | 10 | number | Number of allowed errors per user within window |
| `rate.error.window` | 5 | number | User error rate limit window, in seconds |
| `rate.routes.guild.count` | 5 | number | Allowed number of /guild\* requests per user within window |
| `rate.routes.guild.window` | 5 | number | User /guild\* rate limit window, in seconds |
| `rate.routes.webhook.count` | 10 | number | Allowed number of /webhooks\* requests per user within window |
| `rate.routes.webhook.window` | 5 | number | User /webhooks\* rate limit window, in seconds |
| `rate.routes.channel.count` | 10 | number | Allowed number of /channel\* requests per user within window |
| `rate.routes.channel.window` | 5 | number | User /channel\* rate limit window, in seconds |
| `rate.routes.auth.login.count` | 5 | number | Allowed number of IP /login requests within window |
| `rate.routes.auth.login.window` | 60 | number | IP /login rate limit window, in seconds |
| `rate.routes.auth.register.count` | 2 | number | Allowed number of IP /register requests within window |
| `rate.routes.auth.register.window` | 43200 | number | IP /register rate limit window, in seconds |
| `absoluteRate.register.limit` | 25 | number | Absolute number of registrations instance-wide per window |
| `absoluteRate.register.window` | 3600000 | number | Global /register rate limit window, in milliseconds |
| `absoluteRate.register.enabled` | true | boolean | Whether absolute register rate limits are enabled |
| `absoluteRate.sendMessage.limit` | 200 | number | Absolute number of messages instance-wide per window |
| `absoluteRate.sendMessage.window` | 60000 | number | Global sendMessage window, in milliseconds |
| `absoluteRate.sendMessage.enabled` | true | boolean | Whether absolute message sending rate limits are enabled |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note for future sake, not a blocker: I would probably rework this into a couple more compact sections (ie generalising the definition of "window" and "limit" for most of them, and explaining what absoluteRate is)

"general": {
"instanceDescription": "I'm in space!",
"instanceName": "A Spacebar Instance",
"serverName": "spacebar.example.net"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just be example.net fwiw, if you wanted to do it that way :P

@TheArcaneBrony TheArcaneBrony merged commit 90dfb9e into spacebarchat:master Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants