From c948a4ba4ae35d992fb000271e61bacbb3ef5e87 Mon Sep 17 00:00:00 2001 From: abourtnik Date: Mon, 11 Dec 2023 18:43:17 +0100 Subject: [PATCH] fix: rate limiter upload + add playsinline video for autoplay --- app/Providers/RouteServiceProvider.php | 2 +- resources/views/users/show.blade.php | 1 + resources/views/videos/show.blade.php | 10 +++++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 7ee92ee..4997da2 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -57,7 +57,7 @@ protected function configureRateLimiting() : void }); RateLimiter::for('upload', function (Request $request) { - return Limit::perMinute(100)->by($request->user()->id . $request->get('resumableIdentifier')) + return Limit::perMinute(130)->by($request->user()->id . $request->get('resumableIdentifier')) ->response(fn(Request $request, array $headers) => $this->response($request, $headers)); }); } diff --git a/resources/views/users/show.blade.php b/resources/views/users/show.blade.php index 9ec7460..d882d45 100644 --- a/resources/views/users/show.blade.php +++ b/resources/views/users/show.blade.php @@ -116,6 +116,7 @@ class="rounded-2" poster="{{$user->pinned_video->thumbnail_url}}" oncontextmenu="return false;" autoplay + playsinline > diff --git a/resources/views/videos/show.blade.php b/resources/views/videos/show.blade.php index 450d83e..0f573f8 100644 --- a/resources/views/videos/show.blade.php +++ b/resources/views/videos/show.blade.php @@ -26,7 +26,15 @@ @else -