Fix various code.

This commit is contained in:
James Cole
2025-05-27 17:06:15 +02:00
parent d8f512ca3a
commit 2cb14f6b72
123 changed files with 581 additions and 500 deletions

View File

@@ -31,6 +31,8 @@ use Illuminate\Support\ServiceProvider;
use Laravel\Passport\Passport;
use Override;
use function Safe\preg_match;
/**
* Class AppServiceProvider
*/
@@ -48,7 +50,7 @@ class AppServiceProvider extends ServiceProvider
'Cache-Control' => 'no-store',
];
$uuid = (string) request()->header('X-Trace-Id');
if ('' !== trim($uuid) && (1 === \Safe\preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)))) {
if ('' !== trim($uuid) && (1 === preg_match('/^[a-f\d]{8}(-[a-f\d]{4}){4}[a-f\d]{8}$/i', trim($uuid)))) {
$headers['X-Trace-Id'] = $uuid;
}