From d366adab7dac0678246480cebc2d7ac3a0691977 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Wed, 29 Jan 2020 22:08:12 -0700 Subject: [PATCH] Update web routes, add rate limits to post edit endpoint --- routes/web.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/web.php b/routes/web.php index ea77b10d3..b4c75426f 100644 --- a/routes/web.php +++ b/routes/web.php @@ -405,7 +405,7 @@ Route::domain(config('pixelfed.domain.app'))->middleware(['validemail', 'twofact Route::get('p/{username}/{id}/c', 'CommentController@showAll'); Route::get('p/{username}/{id}/embed', 'StatusController@showEmbed'); Route::get('p/{username}/{id}/edit', 'StatusController@edit'); - Route::post('p/{username}/{id}/edit', 'StatusController@editStore'); + Route::post('p/{username}/{id}/edit', 'StatusController@editStore')->middleware('throttle:maxPostEditsPerHour,60')->middleware('throttle:maxPostEditsPerDay,1440'); Route::get('p/{username}/{id}.json', 'StatusController@showObject'); Route::get('p/{username}/{id}', 'StatusController@show'); Route::get('{username}/embed', 'ProfileController@embed');