chore: .gitea folder and RoutingMiddleware.php
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
namespace App\Framework\Http\Middlewares;
|
||||
|
||||
use App\Framework\Auth\Auth;
|
||||
use App\Framework\Config\TypedConfiguration;
|
||||
use App\Framework\Http\HttpMiddleware;
|
||||
use App\Framework\Http\MiddlewareContext;
|
||||
use App\Framework\Http\MiddlewarePriority;
|
||||
@@ -25,6 +26,7 @@ final readonly class RoutingMiddleware implements HttpMiddleware
|
||||
public function __construct(
|
||||
private HttpRouter $router,
|
||||
private RouteDispatcher $dispatcher,
|
||||
private TypedConfiguration $config,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -47,7 +49,7 @@ final readonly class RoutingMiddleware implements HttpMiddleware
|
||||
throw new RouteNotFound($routeContext->path);
|
||||
}
|
||||
|
||||
if (in_array(Auth::class, $routeContext->match->route->attributes)) {
|
||||
if (!$this->config->app->debug && in_array(Auth::class, $routeContext->match->route->attributes)) {
|
||||
|
||||
#debug($request->server->getClientIp());
|
||||
$wireguardIp = '172.20.0.1';
|
||||
|
||||
Reference in New Issue
Block a user