Download the PHP package aalfiann/url-param-firewall without Composer
On this page you can find all versions of the php package aalfiann/url-param-firewall. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aalfiann/url-param-firewall
More information about aalfiann/url-param-firewall
Files in aalfiann/url-param-firewall
Package url-param-firewall
Short Description A PSR7 middleware for url parameter firewall for Slim Framework 3
License MIT
Informations about the package url-param-firewall
URL Parameter Firewall
A PSR7 middleware for url parameter firewall for Slim Framework 3.
Why we should create firewall for url parameter?
- To prevent from ddos layer 7 which is targeting to attack using random url parameters.
- To prevent useless webpage cache.
- To avoid BOT goes to wrong url.
- To hardening the CSRF and XSS attack.
- Etc.
So you better to whitelisting url parameter for each routes.
Installation
Install this package via Composer.
Usage
Open browser and now make a test:
http://yourdomain.com/ >> WORK
http://yourdomain.com/?page=1 >> WORK
http://yourdomain.com/?page=1&_=3123123 >> WORK
http://yourdomain.com/?product=test >> 404
http://yourdomain.com/?page=1&_=3123123&product=test >> 404
Note:
We should allow url param name _ because it used in jquery ajax cache.