allow upload routes for impersonation (#526)
This commit is contained in:
@@ -58,6 +58,8 @@ class ImpersonationMiddleware
|
||||
|
||||
'user.current',
|
||||
'local.temp',
|
||||
'vapor.signed-storage-url',
|
||||
'upload-file'
|
||||
];
|
||||
|
||||
/**
|
||||
@@ -78,6 +80,7 @@ class ImpersonationMiddleware
|
||||
|
||||
// Check that route is allowed
|
||||
$routeName = $request->route()->getName();
|
||||
ray($routeName);
|
||||
if (!in_array($routeName, self::ALLOWED_ROUTES)) {
|
||||
return response([
|
||||
'message' => 'Unauthorized when impersonating',
|
||||
|
||||
Reference in New Issue
Block a user