Skip to content

Commit f4696dc

Browse files
committed
feature #36651 [FrameworkBundle] Allow configuring the default base URI with a DSN (nicolas-grekas)
This PR was merged into the 5.1-dev branch. Discussion ---------- [FrameworkBundle] Allow configuring the default base URI with a DSN | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fixes #35121, replaces #35580, partially reverts #35281 | License | MIT | Doc PR | - Instead of defining 3-4 parameters, this PR enables using a single DSN to configure the default URL context (for commands mainly): ``` framework: router: base_uri: 'https://my.host:8443/base-path/' ``` When using parameters directly, one can now set the same absolute URI in the `router.request_context.base_url` parameter, this will provide the same benefit. Commits ------- 250fa7e979 [FrameworkBundle] Allow configuring the default base URI with a DSN
2 parents 7304139 + 5437f26 commit f4696dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Resources/config/security_listeners.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
</service>
2121

2222
<service id="security.authentication.retry_entry_point" class="Symfony\Component\Security\Http\EntryPoint\RetryAuthenticationEntryPoint">
23-
<argument>%request_listener.http_port%</argument>
24-
<argument>%request_listener.https_port%</argument>
23+
<argument type="service"><service class="int"><factory service="router.request_context" method="getHttpPort" /></service></argument>
24+
<argument type="service"><service class="int"><factory service="router.request_context" method="getHttpsPort" /></service></argument>
2525
</service>
2626

2727
<service id="security.authentication.basic_entry_point" class="Symfony\Component\Security\Http\EntryPoint\BasicAuthenticationEntryPoint" />

0 commit comments

Comments
 (0)