Skip to content

Commit 898377c

Browse files
committed
Add readme (#5)
1 parent e440946 commit 898377c

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contao Restrict Get Parameters
2+
3+
This Contao extension allows you to restrict GET parameters in the frontend by configuring a whitelist of allowed
4+
parameter patterns. Any GET parameters not matching the whitelist will be marked as unused and won't be processed by
5+
Contao.
6+
7+
## System Requirements
8+
9+
- `PHP 8.1` or higher
10+
- Contao `4.13+` or `5.3+`
11+
- Symfony `5.4+, 6.4+ or 7.0+`
12+
13+
## Configuration
14+
15+
In the Contao system settings, you can:
16+
17+
1. Enable GET parameter restriction
18+
2. Configure a whitelist of allowed parameter patterns using wildcards (e.g., page*, *id, *alias*)
19+
20+
It's also possible to use the bundle configuration:
21+
22+
```yaml
23+
contao:
24+
localconfig:
25+
restrict_get_parameters: true
26+
restrict_get_parameters_whitelist: ['param-a', 'param-b']
27+
```
28+
## Known limitations
29+
30+
### Isotope product list
31+
32+
This extension uses the unused get parameter feature of Contao and marks all get parameters as unused before rendering a
33+
page. Used get parameters on the page are marked as used later on, so in the end Contao throws an exception if any
34+
parameter was not used. This does not work when a page contains an isotope product list / filter, as Isotope marks all
35+
get parameters as used.

0 commit comments

Comments
 (0)