2026-05-20 18:25:15 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Application;
|
|
|
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
|
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
2026-06-08 16:25:52 +02:00
|
|
|
use Illuminate\Http\Request;
|
2026-05-20 18:25:15 +02:00
|
|
|
|
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
|
|
|
->withRouting(
|
|
|
|
|
web: __DIR__.'/../routes/web.php',
|
|
|
|
|
commands: __DIR__.'/../routes/console.php',
|
2026-05-27 21:24:38 +02:00
|
|
|
api: __DIR__.'/../routes/api.php',
|
2026-05-20 18:25:15 +02:00
|
|
|
health: '/up',
|
|
|
|
|
)
|
|
|
|
|
->withMiddleware(function (Middleware $middleware): void {
|
2026-06-16 16:21:43 +02:00
|
|
|
$middleware->encryptCookies(except: ['xf_session','xf_user','xf_csrf','xf_style_variation','activity_filters']);
|
2026-05-20 18:25:15 +02:00
|
|
|
$middleware->alias([
|
|
|
|
|
'xf.auth' => \App\Http\Middleware\CheckXenForoPermissions::class,
|
|
|
|
|
]);
|
2026-06-08 16:25:52 +02:00
|
|
|
$middleware->redirectGuestsTo(function(Request $request): void {
|
|
|
|
|
if( $request->is('manage*'))
|
|
|
|
|
abort(403);
|
|
|
|
|
});
|
2026-05-20 18:25:15 +02:00
|
|
|
})
|
|
|
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
|
|
|
//
|
|
|
|
|
})->create();
|