Add honeypot protection to contact forms
This commit is contained in:
@@ -25,6 +25,7 @@ use App\Support\LocaleConfig;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Inertia\Inertia;
|
||||
use Spatie\Honeypot\ProtectAgainstSpam;
|
||||
|
||||
require __DIR__.'/auth.php';
|
||||
require __DIR__.'/settings.php';
|
||||
@@ -88,13 +89,13 @@ Route::prefix('{locale}')
|
||||
Route::get('/contact', [MarketingController::class, 'contactView'])
|
||||
->name('marketing.contact');
|
||||
Route::post('/contact', [MarketingController::class, 'contact'])
|
||||
->middleware('throttle:contact-form')
|
||||
->middleware(['throttle:contact-form', ProtectAgainstSpam::class])
|
||||
->name('marketing.contact.submit');
|
||||
|
||||
Route::get('/kontakt', [MarketingController::class, 'contactView'])
|
||||
->name('kontakt');
|
||||
Route::post('/kontakt', [MarketingController::class, 'contact'])
|
||||
->middleware('throttle:contact-form')
|
||||
->middleware(['throttle:contact-form', ProtectAgainstSpam::class])
|
||||
->name('kontakt.submit');
|
||||
|
||||
Route::get('/blog', [MarketingController::class, 'blogIndex'])->name('blog');
|
||||
|
||||
Reference in New Issue
Block a user