discourse/config
Alan Guo Xiang Tan 859d61003e
DEV: API to register custom request rate limiting conditions (#30239)
This commit adds the `add_request_rate_limiter` plugin API which allows plugins to add custom rate limiters on top of the default rate limiters which requests by a user's id or the request's IP address.

Example to add a rate limiter that rate limits all requests from Googlebot under the same rate limit bucket:

```
add_request_rate_limiter(
  identifier: :country,
  key: ->(request) { "country/#{DiscourseIpInfo.get(request.ip)[:country]}" },
  activate_when: ->(request) { DiscourseIpInfo.get(request.ip)[:country].present? },
)
```
2024-12-23 09:57:18 +08:00
..
environments DEV: Recover @timestamp in unicorn logs when logstash logger is enabled (#28008) 2024-07-22 15:21:41 +08:00
initializers DEV: API to register custom request rate limiting conditions (#30239) 2024-12-23 09:57:18 +08:00
locales DEV: Cleanup todos from codebase (#30394) 2024-12-19 18:22:33 -08:00
application.rb DEV: Delete symlink when DiscourseFont path changes (#30294) 2024-12-17 13:57:03 +10:00
boot.rb PERF: Stop running bootsnap in development mode on all environments (#25737) 2024-02-19 11:33:52 +08:00
cdn.yml.sample
database.yml DEV: Increase pool connections to 2 in test environment 2024-11-28 12:23:25 +01:00
deploy.rb.sample
dev_defaults.yml DEV: Convert `admin-incoming-email` modal to component-based API (#22701) 2023-07-20 16:31:20 -05:00
discourse.config.sample
discourse.pill.sample
discourse_defaults.conf DEV: Upgrade Rails to version 7.2 2024-11-27 10:48:47 +01:00
environment.rb DEV: Apply syntax_tree formatting to `config/*` 2023-01-09 11:13:29 +00:00
logrotate.conf
multisite.yml.production-sample DEV: Remove `db_id` from sample multisite config. 2020-05-29 10:48:29 +08:00
nginx.sample.conf FIX: Simplify nginx config change (#30383) 2024-12-19 19:10:00 +00:00
projections.json DEV: Use .hbr for raw template file extension (#8883) 2020-02-11 13:38:12 -06:00
puma.rb DEV: Apply syntax_tree formatting to `config/*` 2023-01-09 11:13:29 +00:00
routes.rb DEV: Add categories_and_hot Route (#29948) 2024-11-27 11:11:33 -06:00
sidekiq.yml FEATURE: introduce ultra_low priority queue 2019-01-17 14:53:19 +11:00
site_settings.yml DEV: Cleanup todos from codebase (#30394) 2024-12-19 18:22:33 -08:00
spring.rb DEV: Apply syntax_tree formatting to `config/*` 2023-01-09 11:13:29 +00:00
thin.yml.sample
unicorn.conf.rb DEV: Fix undefined method `check_email_sync_heartbeat` in unicorn conf (#30360) 2024-12-19 10:10:11 +08:00
unicorn_launcher FIX: Increase timeout when trying to reload unicorn. 2018-12-04 13:43:14 +08:00
unicorn_upstart.conf