A Laravel Middleware to filter user inputs from XSS and iframes and other embed elements.
alkhwlani/xss-middleware is a Laravel package for a laravel middleware to filter user inputs from xss and iframes and other embed elements..
It currently has 5 GitHub stars and 521.199 downloads on Packagist (latest version 4.1.2).
Install it with composer require alkhwlani/xss-middleware.
Discover more Laravel packages by alkhwlani
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel middleware to cleaning all inputs/data of request from XSS and embed elements, its used voku/anti-xss under the hood.
| Laravel | laravel-modules | |---|---| | 5.8 | ^1.0 | | 6.X-8.X | ^2.0 | | 9.X | ^3.0 | | 10.X-13.X | ^4.0 |
composer require alkhwlani/xss-middleware
That's it! by default package automatic register a global middleware to cleaning all string inputs for all requests.
if you are not using automatic package discovery, then add the service provider in config/app.php:
\Alkhwlani\XssMiddleware\ServiceProvider::class,
if you want customizes configuration you can publish the configuration
$ php artisan vendor:publish --provider="\Alkhwlani\XssMiddleware\ServiceProvider"
Then check the content of the published config file config/xss-middleware.php.
Run the tests with:
vendor/bin/phpunit
Please see CONTRIBUTING for details.
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.