mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
refactor: move admin route into middleware group and harden authorization
Move the admin panel route into the existing auth middleware group and replace client-side redirects with server-side abort calls in the Livewire component. Extract shared authorization logic into reusable private methods. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
e39678aea5
commit
aea201fcba
3 files changed
+141
-11
No files matched your search
+1
-2
@@ -90,8 +90,6 @@ use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Symfony\Component\HttpFoundation\StreamedResponse;
|
||||
|
||||
Route::get('/admin', AdminIndex::class)->name('admin.index');
|
||||
|
||||
Route::post('/forgot-password', [Controller::class, 'forgot_password'])->name('password.forgot')->middleware('throttle:forgot-password');
|
||||
Route::get('/realtime', [Controller::class, 'realtime_test'])->middleware('auth');
|
||||
Route::get('/verify', [Controller::class, 'verify'])->middleware('auth')->name('verify.email');
|
||||
@@ -109,6 +107,7 @@ Route::middleware(['auth', 'verified'])->group(function () {
|
||||
});
|
||||
|
||||
Route::get('/', Dashboard::class)->name('dashboard');
|
||||
Route::get('/admin', AdminIndex::class)->name('admin.index');
|
||||
Route::get('/onboarding', BoardingIndex::class)->name('onboarding');
|
||||
|
||||
Route::get('/subscription', SubscriptionShow::class)->name('subscription.show');
|
||||
|
||||
Reference in new issue
Block a user