Add honeypot protection to contact forms
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

This commit is contained in:
Codex Agent
2026-01-23 15:38:34 +01:00
parent d629b745c4
commit 4bf0d5052c
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');