This repository was archived by the owner on Oct 15, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +32
-27
lines changed
Expand file tree Collapse file tree 2 files changed +32
-27
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ declare (strict_types=1 );
4+
5+ use Symfony \Component \DependencyInjection \Loader \Configurator \ContainerConfigurator ;
6+ use Symfony \Config \Framework \SessionConfig ;
7+ use Symfony \Config \FrameworkConfig ;
8+
9+ use function Symfony \Component \DependencyInjection \Loader \Configurator \env ;
10+
11+ return static function (ContainerConfigurator $ containerConfigurator , FrameworkConfig $ frameworkConfig ): void {
12+ $ sessionConfig = $ frameworkConfig ->session ();
13+ assert ($ sessionConfig instanceof SessionConfig);
14+
15+ $ frameworkConfig ->secret (env ('APP_SECRET ' ));
16+
17+ $ sessionConfig ->handlerId (env ('REDIS_URI ' ));
18+
19+ $ frameworkConfig ->trustedProxies ('private_ranges ' );
20+ $ frameworkConfig ->trustedHeaders ([
21+ 'x-forwarded-for ' ,
22+ 'x-forwarded-host ' ,
23+ 'x-forwarded-proto ' ,
24+ 'x-forwarded-port ' ,
25+ 'x-forwarded-prefix ' ,
26+ ]);
27+
28+ if ('test ' === $ containerConfigurator ->env ()) {
29+ $ frameworkConfig ->test (true );
30+ $ sessionConfig ->storageFactoryId ('session.storage.factory.mock_file ' );
31+ }
32+ };
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments