Deon George 4494154879
All checks were successful
Create Docker Image / Test Application (x86_64) (push) Successful in 32s
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 1m38s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 3m2s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s
Fix regression introduced in 56fcd729. Server was added to the configuration before SwapinAuthUser::class resulting in the configured LDAP user being used for all queries and not the logged in user. Fixes #348
2025-06-30 20:35:33 +08:00

35 lines
877 B
PHP

<?php
use Illuminate\Foundation\Application;
use Illuminate\Foundation\Configuration\Exceptions;
use Illuminate\Foundation\Configuration\Middleware;
use App\Http\Middleware\{AcceptLanguage,AllowAnonymous,CheckUpdate,SwapinAuthUser,ViewVariables};
return Application::configure(basePath: dirname(__DIR__))
->withRouting(
web: __DIR__.'/../routes/web.php',
commands: __DIR__.'/../routes/console.php',
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->appendToGroup(
group: 'web',
middleware: [
AcceptLanguage::class,
AllowAnonymous::class,
SwapinAuthUser::class,
ViewVariables::class,
CheckUpdate::class,
]);
$middleware->trustProxies(at: [
'10.0.0.0/8',
'127.0.0.0/8',
'172.16.0.0/12',
'192.168.0.0/12',
]);
})
->withExceptions(function (Exceptions $exceptions) {
//
})->create();