Skip to content

Conversation

@GromNaN
Copy link
Member

@GromNaN GromNaN commented Mar 16, 2022

Fix #13247 for symfony/symfony#35747

Very useful to match host based on env var.

blog_list:
    path: /blog
    # the controller value has the format 'controller_class::method_name'
    controller: App\Controller\BlogController::list
    condition: "context.getHost() == env('APP_MAIN_HOST')"

@javiereguiluz
Copy link
Member

Jérôme, thanks a lot for providing this missing doc!

@GromNaN GromNaN deleted the patch-2 branch March 25, 2022 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Routing][FrameworkBundle] Allow using env() in route conditions

4 participants