From 831698f44bad367ea65a118ad6dddf56ddd2aa34 Mon Sep 17 00:00:00 2001 From: "noah.lancien" Date: Wed, 6 Sep 2023 10:18:25 +0000 Subject: [PATCH] Lang switchs now redirect to the same page with the selected lang --- app/Http/Middleware/SecureHeaders.php | 4 +++- app/Http/Requests/Bo/UpdateMiniCrudRequest.php | 1 + composer.lock | 12 ++++++------ resources/views/fo/layouts/footer.blade.php | 2 +- resources/views/fo/layouts/header.blade.php | 2 +- resources/views/fo/layouts/navigation.blade.php | 2 +- routes/web-bo.php | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/Http/Middleware/SecureHeaders.php b/app/Http/Middleware/SecureHeaders.php index 7dc15269..d326a5ff 100644 --- a/app/Http/Middleware/SecureHeaders.php +++ b/app/Http/Middleware/SecureHeaders.php @@ -39,7 +39,7 @@ class SecureHeaders $jsDev = config('app.debug') ? "'unsafe-eval' 'unsafe-inline'" : "'nonce-{$nonce}' 'strict-dynamic'"; $scheme = config('app.env') === 'local' ? 'http' : 'https'; $reportUri = Route::has('cspReportUri') ? - \sprintf(' report-uri %s ;', \parse_url(route('cspReportUri'), \PHP_URL_PATH)) : ''; + \sprintf(' report-uri %s ;', \parse_url(route('cspReportUri'), \PHP_URL_PATH)) : ''; $this->removeUnwantedHeaders($this->unwantedHeaderList); $response = $next($request); $response->headers->set('Referrer-Policy', 'no-referrer-when-downgrade'); @@ -84,7 +84,9 @@ class SecureHeaders ]) . ';', // ! If you dont use ckeditor use this // "style-src 'self' 'nonce-$nonce';", + // phpcs:disable Generic.Commenting.Fixme.TaskFound // FIXME: use Alpine CSP compliant. + // phpcs:enable // ! unsave Eval needed for Alpine JS de merde. // phpcs:ignore Generic.Files.LineLength.TooLong "script-src 'self' 'unsafe-eval' {$jsDev} " . \implode(' ', [ diff --git a/app/Http/Requests/Bo/UpdateMiniCrudRequest.php b/app/Http/Requests/Bo/UpdateMiniCrudRequest.php index a9a3aad0..8d2539b1 100644 --- a/app/Http/Requests/Bo/UpdateMiniCrudRequest.php +++ b/app/Http/Requests/Bo/UpdateMiniCrudRequest.php @@ -32,6 +32,7 @@ abstract class UpdateMiniCrudRequest extends FormRequest * Get the validation rules that apply to the request. * * @return array + * @phpcs:disable Generic.Metrics.CyclomaticComplexity.MaxExceeded * @phpcs:disable Generic.Metrics.NestingLevel.TooHigh * @phpcs:disable Generic.Metrics.CyclomaticComplexity.MaxExceeded */ diff --git a/composer.lock b/composer.lock index 1ace35c8..92fd98aa 100644 --- a/composer.lock +++ b/composer.lock @@ -311,16 +311,16 @@ }, { "name": "codezero/laravel-localized-routes", - "version": "3.1.3", + "version": "3.1.5", "source": { "type": "git", "url": "https://github.com/codezero-be/laravel-localized-routes.git", - "reference": "fac6e4a7bb32e2c42bb7aca53d3336d450ab3cba" + "reference": "0ebb3acd58b4b635ec9d6d20de9a1770da0c9ced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/codezero-be/laravel-localized-routes/zipball/fac6e4a7bb32e2c42bb7aca53d3336d450ab3cba", - "reference": "fac6e4a7bb32e2c42bb7aca53d3336d450ab3cba", + "url": "https://api.github.com/repos/codezero-be/laravel-localized-routes/zipball/0ebb3acd58b4b635ec9d6d20de9a1770da0c9ced", + "reference": "0ebb3acd58b4b635ec9d6d20de9a1770da0c9ced", "shasum": "" }, "require": { @@ -379,7 +379,7 @@ ], "support": { "issues": "https://github.com/codezero-be/laravel-localized-routes/issues", - "source": "https://github.com/codezero-be/laravel-localized-routes/tree/3.1.3" + "source": "https://github.com/codezero-be/laravel-localized-routes/tree/3.1.5" }, "funding": [ { @@ -391,7 +391,7 @@ "type": "ko_fi" } ], - "time": "2023-05-02T10:47:12+00:00" + "time": "2023-06-01T20:21:52+00:00" }, { "name": "codezero/laravel-unique-translation", diff --git a/resources/views/fo/layouts/footer.blade.php b/resources/views/fo/layouts/footer.blade.php index 0ac23dd9..1287f325 100644 --- a/resources/views/fo/layouts/footer.blade.php +++ b/resources/views/fo/layouts/footer.blade.php @@ -19,7 +19,7 @@