mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-11 02:50:29 +00:00
🛠️ **Fix config serialization and optimize caching**
- 🗑️ Removed `SecurityScheme` from `scramble.php` due to non-serializable issues causing `config:cache`/`optimize` failures. - ✏️ Added clarification on `scheme` omission with default fallback to `SecurityScheme::http('bearer')`.
This commit is contained in:
+7
-2
@@ -2,7 +2,6 @@
|
||||
|
||||
use Dedoc\Scramble\Http\Middleware\RestrictedDocsAccess;
|
||||
use Dedoc\Scramble\SecurityDocumentation\MiddlewareAuthSecurityStrategy;
|
||||
use Dedoc\Scramble\Support\Generator\SecurityScheme;
|
||||
|
||||
return [
|
||||
/*
|
||||
@@ -187,11 +186,17 @@ return [
|
||||
* ],
|
||||
* ],
|
||||
*/
|
||||
/*
|
||||
* NOTE: `scheme` is intentionally omitted here. Passing a `SecurityScheme` object
|
||||
* instance would make the config non-serializable and break `config:cache`/`optimize`
|
||||
* (LogicException: value is non-serializable). `MiddlewareAuthSecurityStrategy`
|
||||
* defaults to `SecurityScheme::http('bearer')` when no scheme is provided, which is
|
||||
* exactly what we want.
|
||||
*/
|
||||
'security_strategy' => [
|
||||
MiddlewareAuthSecurityStrategy::class,
|
||||
[
|
||||
'middleware' => ['auth', 'auth:*'],
|
||||
'scheme' => SecurityScheme::http('bearer'),
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user