You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/hosting/infrastructure/rate-limiter.md
+36-12Lines changed: 36 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,31 @@ This functionality is available starting with Shopware 6.4.6.0.
15
15
16
16
Shopware 6 provides certain rate limits by default that reduces the risk of brute-force attacks for pages like login or password reset.
17
17
18
+
These rate limiters are always active. You do not need to add the `shopware.api.rate_limiter` map to your `shopware.yml` for them to work. The core already ships with the defaults documented below, and the `shopware.yml` is only used to override them (for example, to raise a limit or disable a limiter).
19
+
20
+
## Default rate limiters
21
+
22
+
The following limiters are enabled by default. The values listed here reflect the current Shopware core configuration and may change between versions. When in doubt, the source of truth is `src/Core/Framework/Resources/config/packages/shopware.yaml` in the version you are running.
|`cart_add_line_item`| Adding line items to the cart | 6.4.18.0 |`system_config`| 1 hour | Limit read from `core.cart.lineItemAddLimit`, interval 60s |
|`mcp_admin_api`| MCP server Admin API access (keyed per OAuth token) | 6.8.0.0 |`time_backoff`| 1 hour | 300 / 60s, 1000 / 10min |
39
+
|`mcp_store_api`| MCP server Store API access (keyed per sales-channel context token) | 6.8.0.0 |`time_backoff`| 1 hour | 120 / 60s, 600 / 10min |
40
+
41
+
In the table above, `Limits` uses the `limit / interval` notation, and `s` / `min` are seconds / minutes. When you add a new default limiter to the core, add a row here with its introduction version so this table stays complete.
42
+
18
43
## Configuration
19
44
20
45
The configuration for the rate limiter of Shopware 6 resides in the general bundle configuration:
@@ -26,19 +51,13 @@ The configuration for the rate limiter of Shopware 6 resides in the general bund
26
51
└── shopware.yml
27
52
```
28
53
29
-
To configure the default rate limiters for your shop, you need to add the `shopware.api.rate_limiter` map to the `shopware.yml`. Under this key, you can separately define the rate limiters.
54
+
To override the [default rate limiters](#default-rate-limiters) for your shop, you need to add the `shopware.api.rate_limiter` map to the `shopware.yml`. Under this key, you can separately define each rate limiter. Any key you set is merged into the defaults, so you only need to configure the values you want to change.
30
55
31
-
In the following, you can find a list of the default limiters:
56
+
The following example disables the `login` limiter and overrides the `oauth` limiter:
0 commit comments