Skip to content

Commit

Permalink
Throttle websitelookup's to 10 per minute to limit port scan effictiv…
Browse files Browse the repository at this point in the history
…eness
  • Loading branch information
Chris Hunt committed Nov 4, 2024
1 parent 599035b commit 837f5c4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,13 @@
/**
* Item Routes
*/
Route::middleware(['throttle:10,1'])->group(function () {
Route::get('/items/websitelookup/{url}', [ItemController::class, 'websitelookup'])->name('lookup');
});

Route::resource('items', ItemController::class);

Route::name('items.')->prefix('items')->group(function () {
Route::get('/websitelookup/{url}', [ItemController::class, 'websitelookup'])->name('lookup');
Route::get('/pin/{id}', [ItemController::class, 'pin'])->name('pin');
Route::get('/restore/{id}', [ItemController::class, 'restore'])->name('restore');
Route::get('/unpin/{id}', [ItemController::class, 'unpin'])->name('unpin');
Expand Down

0 comments on commit 837f5c4

Please sign in to comment.