Download the PHP package wafris/laravel-wafris without Composer
On this page you can find all versions of the php package wafris/laravel-wafris. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wafris/laravel-wafris
More information about wafris/laravel-wafris
Files in wafris/laravel-wafris
Package laravel-wafris
Short Description Wafris for Laravel
License MIT
Homepage https://github.com/wafris/laravel-wafris
Informations about the package laravel-wafris
Wafris for Laravel
Wafris is an open-source Web Application Firewall (WAF) that runs within Laravel (and other frameworks) powered by Redis.
Paired with Wafris Hub, you can create rules to block malicious traffic from hitting your application.
Rules like:
- Block IP addresses (IPv6 and IPv4) from making requests
- Block on hosts, paths, user agents, parameters, and methods
- Rate limit (throttle) requests
- Visualize inbound traffic and requests
Need a better explanation? Read the overview at: wafris.org
Installation
1. Connect on Wafris Hub
Go to https://wafris.org/hub to create a new account and follow the instructions to link your Redis instance.
Note: In Step 3, you'll use this same Redis URL in your app configuration.
2. Install this library via Composer
3. Publish and configure Wafris
You can publish the config file with:
We recommend creating a separate Redis configuration for Wafris. That can be done in config/database.php
with a new entry like this:
Usage
Add the Wafris\AllowRequestMiddleware
middleware to routes that you want to have protected by Wafris.
Protecting all routes
To protect all routes in your Laravel application, add the Wafris\AllowRequestMiddleware
globally.
Laravel 11
Starting in Laravel 11, middleware are registered in bootstrap/app.php
. Add the following line in the withMiddleware
section of that file:
Laravel 10
To protect all routes in your Laravel application, add Wafris\AllowRequestMiddleware
to the $middleware
property of your app/Http/Kernel.php
class.
Protecting specific middleware groups
To protect specific middleware groups, such as the web
or api
groups, add Wafris\AllowRequestMiddleware
to each desired middleware group in your app/Http/Kernel.php
class.
Protecting individual routes
Use the Wafris\AllowRequestMiddleware
middleware when defining your route.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributors
Help / Support
- Email: [email protected]
- Twitter: @wafrisorg
- Booking: https://app.harmonizely.com/expedited/wafris
License
Elastic License 2.0 - Please see License File for more information.
All versions of laravel-wafris with dependencies
illuminate/contracts Version ^10.0|^11.0
predis/predis Version ^2.2
spatie/laravel-package-tools Version ^1.14.0