Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Routing] Support for env variables when configuring locale based on host #38210

Copy link
Copy link
Closed
@Wirone

Description

@Wirone
Issue body actions

Description
I've followed #30617 (and symfony/symfony-docs#13571) for configuring support for locales based on host. Unfortunately, it does not support for env variables for hosts and in my opinion it makes this feature unusable, non-friendly at least:

  • routes must be defined differently for DEV and PROD
  • moving app between domains requires changes in codebase

Would be great if hosts could be passed as env variables.

Example

foo:
    resource: routes/foo.yaml
    prefix: /
    defaults:
        _format: html
    host:
        en: '%env(APP_HTTP_HOST)'
        pl: '%env(APP_HTTP_HOST_PL)'

With config above it does not work, even considering #38209 is fixed and host-related rules are checked.


CC: @odolbeau

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.