Laravel Middleware: Role + signed URL

Posted 1 year ago by sktklaus

In my Routes I have videos/{id} I want to use a Signed URL, which works fine, but I also want to access the page if logged as admin, but I don't know how to use both together. as admin, when I access the page

middleware('signed','role:superadministrator|administrator')

it returns invalid signature

Route::get('/videos/{id}', '[email protected]', function (Request $request, $id, $user, $company) {
  if (! $request->hasValidSignature()) {
    abort(401);
  }
})->name('video')->middleware('signed','role:superadministrator|administrator');

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.