Add honeypot protection to contact forms

This commit is contained in:
Codex Agent
2026-01-23 15:38:34 +01:00
parent 531c666cf0
commit f19a83d4ee
10 changed files with 312 additions and 106 deletions

View File

@@ -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');